couldn't find "libyuv.so

couldn’t find “libyuv.so”

使用某些so文件,在我的红米note3上会报java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file “/data/app/net.babyduck-2/base.apk”],nativeLibraryDirectories=[/data/app/net.babyduck-2/lib/arm64, /vendor/lib64, /system/lib64]]] couldn’t find “libyuv.so”

解决方法:
在build.gradle加入以下代码

splits {
        abi {
            enable true
            reset()
            include 'armeabi-v7a'
            universalApk false
        }
    }
    repositories {
        flatDir {
            dirs 'libs' //this way we can find the .aar file in libs folder
        }
    }

你可能感兴趣的:(android备忘录)