【问题标题】:C# Xamarin SQLite Database ErrorC# Xamarin SQLite 数据库错误
【发布时间】: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


    【解决方案1】:

    我确实遇到了同样的问题,如果你在 Windows 上尝试降级你的 Xamarin,但 mac 似乎很稳定

    【讨论】:

    • 你的意思是android 7.0?
    • 我现在运行的是 7.1.1
    猜你喜欢
    • 2017-06-24
    • 2015-12-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多