使用 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/