java.lang.UnsatisfiedLinkError aacdecoder lib

时间:2016-04-04 08:48:24

标签: android

我在我的应用程序中使用aacdecoder库。我得到了一个

  

java.lang.UnsatisfiedLinkError中:   dalvik.system.PathClassLoader [DexPathList [[zip文件   “/data/app/com.ianmanda.starfmplus-1/base.apk"],nativeLibraryDirectories=[/data/app/com.ianmanda.starfmplus-1/lib/arm64,   / vendor / lib64,/ system / lib64]]]找不到“libaacdecoder.so”

和我的主app模块gradle

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile project(':libs')
}

和我的module-lib gradle

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.3"

    defaultConfig {
        minSdkVersion 16
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"

       ndk {
           abiFilters "armeabi-v7a", "x86", "armeabi", "mips", "arm64"
       }
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    sourceSets {
        main {
            jni.srcDirs = []
            jniLibs.srcDir("src/main/libs")
        }
    }

2 个答案:

答案 0 :(得分:0)

解决方案在这里a mobiwise blog fixed it

感谢@DanielZolnai

答案 1 :(得分:0)

确保libaacdecoder.so中有src/main/libs/arm64个文件,并将android.useDeprecatedNdk=true行添加到gradle.properties