用xamarin开发android遇见 SQLite.SQLiteException: no such collation sequence: Id 解决方法

来源:互联网 发布:中华遗产 知乎 编辑:程序博客网 时间:2024/06/14 02:53

参考博客  http://blog.csdn.net/kebi007/article/details/53795552 做sqlite存储时居然遇见这个问题

另外,这个UserInfo类是和 MainActivity类是放在同一个.cs文件里的

遇见错误
SQLite.SQLiteException: no such collation sequence: Id
解决方法:
[Table("UserInfo")]
public class UserInfo
{
[PrimaryKey, AutoIncrement,/* Collation("Id") 把这个暂时注释一次,然后就可以了*/]
public int Id { get; set; }
public string UserName { get; set; }
public string Pwd { get; set; }
}

阅读全文
1 0