Android Nougat:检测到应用原生库问题

Android Nougat: Detected problems with app native libraries

我们刚刚将 Nexus 96 升级到 Android N,现在在使用我们的应用程序时出现以下弹出窗口:

给我一些建议

检查报告了同样的问题: https://github.com/litehelpers/Cordova-sqlcipher-adapter/issues/41

现在已经解决了

供参考:

sqlcipher/android-database-sqlcipher#216

您可以检查 SQLCipher 的 Android 版本—Android N 支持以下 link:

https://discuss.zetetic.net/t/sqlcipher-for-android-release-android-n-support/1465

编辑:

您也可以查看 NDK Apps Linking to Platform Libraries 私人图书馆使用。

检查“更新您的应用程序”部分,其中提供了修复这些类型错误的步骤。

您可能正在使用直接访问私有 API 的本机库。问题描述如下。

来自 Android 开发者博客 https://android-developers.googleblog.com/2016/06/android-changes-for-ndk-developers.html:

Private API (Enforced since API 24)

Native libraries must use only public API http://developer.android.com/ndk/guides/stable_apis.html?utm_campaign=android_discussion_ndkchanges_062716&utm_source=anddev&utm_medium=blog, and must not link against non-NDK platform libraries. Starting with API 24 this rule is enforced and applications are no longer able to load non-NDK platform libraries. The rule is enforced by the dynamic linker, so non-public libraries are not accessible regardless of the way code tries to load them: System.loadLibrary(...), DT_NEEDED entries, and direct calls to dlopen(...) will fail in exactly the same way.

(...)

Potential problems: starting from API 24 the dynamic linker will not load private libraries, preventing the application from loading.

Resolution: rewrite your native code to rely only on public API. As a short term workaround, platform libraries without complex dependencies (libcutils.so) can be copied to the project. As a long term solution the relevant code must be copied to the project tree. SSL/Media/JNI internal/binder APIs should not be accessed from the native code. When necessary, native code should call appropriate public Java API methods.

A complete list of public libraries is available within the NDK, under platforms/android-API/usr/lib.

正如其他答案指出的那样,这个 API 24 问题似乎已经解决。