android - 在 64 位 Android 设备上找不到 .so 文件

标签 android android-ndk aviary adobecreativesdk

使用 aviary android sdk 使用 android studio 和 gradle 构建。 生成的应用程序在所有具有 32 位架构的设备上运行良好。

同一个应用程序在 64 位设备中出现以下错误 [例如。索尼C4]

    java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file 
"/data/app/com.myapp/base.apk"],nativeLibraryDirectories=[/data/app/com.myapp/lib/arm64, /vendor/lib64, /system/lib64]]] couldn't find "libaviary_moalite.so"

gredle.build 部分

dependencies {
    ...
    compile 'com.android.support:multidex:1.0.0'
    compile 'com.facebook.fresco:fresco:0.8.1+'
    compile 'com.facebook.fresco:imagepipeline-okhttp:0.8.1+'
    compile 'com.android.support:appcompat-v7:22.2.1'
    compile 'com.adobe.creativesdk:image:4.0.0'
}

引用无效

Can't find ARM64 NDK native lib using Android Studio (1.3 RC)

如果使用任何已使用的解决方案,都会出现同样的错误。

How to use 32-bit native libraries on 64-bit Android device

得到类似的错误

Error:(16, 0) Error: NDK integration is deprecated in the current plugin.  Consider trying the new experimental plugin.  For details, see http://tools.android.com/tech-docs/new-build-system/gradle-experimental.  Set "android.useDeprecatedNdk=true" in gradle.properties to continue using the current NDK integration.

我不确定我做错了什么或者根本不支持它。

最佳答案

您使用的某些软件包似乎带有 64 位库,但有些则没有。为了让您的 APK 仅保持 32 位,我使用

android {
    splits {
        abi {
            enable true
            reset()
            include 'armeabi-v7a'
        }
    }
}

如果相关,您也可以使用 include 'armeabi'

关于android - 在 64 位 Android 设备上找不到 .so 文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33915850/

相关文章:

onCreateOptionsMenu 上的 Android NullPointerException

android - 如何修改来自 Android 应用程序的 HTTP 请求 header ?

android - 在 Android init.rc 中执行一个守护进程

android - 使用 C++ 支持创建 Android 项目的正确方法

javascript - Javascript Web 中的共享元素转换

android - NDK 构建错误

android - 为什么两个不同的应用程序使用 aviary sdk 没有安装在同一台设备上?

javascript - Aviary 编辑器加载空白图像,直到调整屏幕大小

ios - 适用于 iOS 的 Aviary SDK : Present view controller on top of AFPhotoEditorController does not work well

android - 从 DPI(每英寸点数)android 获取以像素为单位的图像大小