就像这样的错误
Java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader
[DexPathList[[zip file "/data/app/com.pckgname.live-2/base.apk"],
nativeLibraryDirectories=[/data/app/com.pckgname.live-2/lib/arm64, /vendor/lib64, /system/lib64]]] couldn't find "libvinit.so"
java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader
[DexPathList[[zip file "/data/app/com.belongsoft.smartvillage-2/base.apk"],
nativeLibraryDirectories=[/data/app/com.belongsoft.smartvillage-2b/arm, endorb, /systemb]]] couldn't find "libffmpeg.so"
错误的解决方法:
如图只要在app的build.gradle中添加如下代码,然后rebuild.
例子:
android {
defaultConfig {
multiDexEnabled true
ndk {
abiFilters "armeabi", "armeabi-v7a", "x86", "mips"
}
}
sourceSets {
main {
jniLibs.srcDirs = ['libs']
}
}
}
对于Eclipse
在lib目录下建下面这些文件夹 然后把所有报错的so文件都放一份到每个文件夹下。
"armeabi", "armeabi-v7a", "x86", "mips"
博客地址:http://blog.csdn.net/lxk_1993
如果你喜欢我的博客,请关注我。欢迎留言拍砖。
网友评论
ndk {
abiFilters "armeabi", "armeabi-v7a", "x86", "mips"
}