Ume*_*wte 4 android android-ndk aviary adobecreativesdk
使用aviary android sdk使用android studio和gradle build.应用程序生成在具有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"
Run Code Online (Sandbox Code Playgroud)
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'
}
Run Code Online (Sandbox Code Playgroud)
参考那没用
使用Android Studio找不到ARM64 NDK本机库(1.3 RC)
如果使用任何解决方案,则出现相同的错
得到错误就像
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.
Run Code Online (Sandbox Code Playgroud)
我不确定我在做什么错,或者根本不支持.
Ale*_*ohn 18
看起来你使用的一些软件包带有64位库,但有些则没有.为了保持你的APK 32位,我使用
android {
splits {
abi {
enable true
reset()
include 'armeabi-v7a'
}
}
}
Run Code Online (Sandbox Code Playgroud)
include 'armeabi'如果相关,您也可以玩.
小智 6
我通过以下步骤解决了这个问题:
我将armeabi和x86文件夹从:\ src\main\jniLibs移动到:\ libs
请确保移动这些文件夹下的所有文件:*.so文件应该位于那里.
我在build.gradle中添加了以下内容:
sourceSets.main {
jniLibs.srcDir 'src/main/libs'
}
Run Code Online (Sandbox Code Playgroud)清理+重建项目
*如果您使用的是multidex,请验证这些行已添加到build.gradle:
defaultConfig {
multiDexEnabled true
}
dexOptions {
preDexLibraries false
javaMaxHeapSize "4g"
}
Run Code Online (Sandbox Code Playgroud)此外,这应该添加到您的清单文件中:
<application
android:name="android.support.multidex.MultiDexApplication">
/application>
Run Code Online (Sandbox Code Playgroud)
希望这可以帮助.
| 归档时间: |
|
| 查看次数: |
7879 次 |
| 最近记录: |