【问题标题】:SQLCipher findLibrary returned nullSQLCipher findLibrary 返回 null
【发布时间】:2014-01-23 14:24:16
【问题描述】:

我最近更新了 sqlcipher,使其能够与 Android 4.4 版本一起使用,该版本适用于我测试过的所有设备,主要是 Android 版本 4+。除了我收到以下错误的 Galaxy note 8 之外:

    java.lang.UnsatisfiedLinkError: Couldn't load stlport_shared from loader dalvik.system.PathClassLoader[dexPath=/data/app/uk.co.onefile.assessoroffline-2.apk,libraryPath=/data/app-lib/uk.co.onefile.assessoroffline-2]: findLibrary returned null
at java.lang.Runtime.loadLibrary(Runtime.java:365)
at java.lang.System.loadLibrary(System.java:535)
at net.sqlcipher.database.SQLiteDatabase.loadLibs(SQLiteDatabase.java:142)
at net.sqlcipher.database.SQLiteDatabase.loadLibs(SQLiteDatabase.java:137)

这是调用SQLiteDatabase.loadLibs(this); 的时间。我想知道是否有人可以帮助我解决这个问题。在过去的几天里,我一直在努力解决这个问题,但无济于事。

【问题讨论】:

  • 然后使用静态 stlport 编译(或查找二进制)SQLCipher c/c++ 代码(好像您的编译版本正在使用 stlport 共享库,这在您的 Galaxy Note 上似乎不可用)
  • 尝试在 Note 8 上下载并安装 github.com/commonsguy/cw-omnibus/tree/master/Database/…。如果可行,请查看其 libs/ 目录与您的目录有何不同。如果它不起作用,那么可能是 Note 8 有问题,我想进一步调查。

标签: android database sqlite sqlcipher


【解决方案1】:

我遇到了同样的问题,可以用 Dharmik 的回答 here 来解决它(也就是说,在您的 app/src/main/ 中,创建一个 jniLibs 目录,您可以在其中放置库文件夹)

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-02-07
    • 2012-02-20
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多