【发布时间】:2018-04-04 16:49:18
【问题描述】:
在使用 SQLite 时,我在每台设备上仍然遇到相同的错误: "System.DllNotFoundException: /system/lib/libsqlite.so 发生"
它总是发生在这一行:
var r = SQLite3.Open (databasePathAsBytes, out handle, (int) openFlags, IntPtr.Zero);
我能做什么?
编辑:这个函数使用正确吗???:
public bool CreateDatabase()
{
try
{
using (var connection = new SQLiteConnection(System.IO.Path.Combine(folder, "CryptoSimulator.db")))
{
connection.CreateTable<Portfolio>();
connection.CreateTable<Wallet>();
connection.CreateTable<Assignments>();
return true;
}
}
catch(SQLiteException ex)
{
Log.Info("SQLiteEx", ex.Message);
return false;
}
}
【问题讨论】:
标签: c# android database sqlite xamarin