2016-10-04 89 views
0

我使用Xamarin.Android開發Android上的Visual Studio 2015和我得到的PCL項目出現以下錯誤:System.Exception的:表中沒有(公共)列

Unhandled Exception: 
10-04 01:47:04.594 E/mono (3322): System.Exception: Table has no (public) columns 
10-04 01:47:04.594 E/mono (3322): at SQLite.Net.SQLiteConnection.CreateTable (System.Type ty, CreateFlags createFlags) [0x0002e] in <filename unknown>:0 
10-04 01:47:04.594 E/mono (3322): at SQLite.Net.Async.SQLiteAsyncConnection+<>c__DisplayClass11_0.<CreateTablesAsync>b__0() [0x0002b] in <filename unknown>:0 

我的包裝屬性設置爲關閉Use Shared Runtime

我的鏈接屬性設置爲鏈接Sdk and User Assemblies

我支持armx86體系結構,我的Java Mas Heap Size1G

我已經搜索這個錯誤,但是我找不到任何相關的東西。

[Table("User")] 
public class User : IBusinessEntity 
{ 
    [PrimaryKey, AutoIncrement] 
    public long Id { get; set; } 
    public string Name { get; set; } 
    public string Email { get; set; } 
    public string Password { get; set; } 
    public DateTime CreationDate { get; set; } 
} 

我使用SQLite.Net.Async-PCL庫:

錯誤時SQLite嘗試創建一個表,這個實體出現。

回答

1

最後我想通了。

nuget包Xamarin.Android.Support.v7.AppCompat丟失,我得到這個隨機錯誤。現在它是固定的。

我還將鏈接器屬性更改爲None。不確定是否有必要。