使用 Android Studio 和 Gradle 构建,使用 Aviary Android SDK。在所有拥有 32 位架构的设备上运行正常。
同一应用在拥有 64 位架构的设备上出现以下错误 [例如 Sony 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"
gradle.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'
}
无法解决的参考资料
使用Android Studio(1.3 RC)找不到ARM64 NDK本地库
如果使用任何已用的解决方案,将会出现相同的错误。
出现类似以下的错误:
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.
我不确定我做错了什么还是根本不支持。