C# Sqlite数据库未连接Xamarin.forms应用程序

C# Sqlite数据库未连接Xamarin.forms应用程序,c#,sqlite,xamarin,xamarin.forms,C#,Sqlite,Xamarin,Xamarin.forms,大家好,开发人员,我是新手Xamarin.Forms,我想将SQlite与Xamarin.Forms连接起来。但是没有连接。我复制了微软关于SQlite的官方文档。这是我的密码 private void Button_Clicked(object sender, EventArgs e) { string dbPath = Path.Combine( Environment.GetFolderPath(Environment.SpecialFolder.Personal), "datab

大家好,开发人员,我是新手Xamarin.Forms,我想将SQlite与Xamarin.Forms连接起来。但是没有连接。我复制了微软关于SQlite的官方文档。这是我的密码

private void Button_Clicked(object sender, EventArgs e)
{
    string dbPath = Path.Combine(
Environment.GetFolderPath(Environment.SpecialFolder.Personal),
"database.db3");
    var con = new SQLiteConnection(dbPath);
}
当我点击按钮时,会出现这个错误

System.TypeInitializationException:'的类型初始值设定项 “SQLite.SQLiteConnection”引发了异常。”


我的错误在哪里?我找不到。感谢您的关注。

什么是内部异常?请查看可能缺少对NuGet软件包的引用。我希望您使用的是我使用的是1.7.302-Beta