java.lang.UnsatisfiedLinkError ....无法找到" libaacdecoder.so"

时间:2017-04-19 04:37:58

标签: java android debugging android-ndk arm

所以我花了最近3天的时间疯狂地试图找出导致流媒体广播应用程序出现以下错误的原因。

FATAL EXCEPTION: main

Process: ca.threeohsixmedia.radio, PID: 24294

java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/ca.threeohsixmedia.radio-1/base.apk", zip file "/data/app/ca.threeohsixmedia.radio-1/split_lib_dependencies_apk.apk", zip file "/data/app/ca.threeohsixmedia.radio-1/split_lib_slice_0_apk.apk", zip file "/data/app/ca.threeohsixmedia.radio-1/split_lib_slice_1_apk.apk", zip file "/data/app/ca.threeohsixmedia.radio-1/split_lib_slice_2_apk.apk", zip file "/data/app/ca.threeohsixmedia.radio-1/split_lib_slice_3_apk.apk", zip file "/data/app/ca.threeohsixmedia.radio-1/split_lib_slice_4_apk.apk", zip file "/data/app/ca.threeohsixmedia.radio-1/split_lib_slice_5_apk.apk", zip file "/data/app/ca.threeohsixmedia.radio-1/split_lib_slice_6_apk.apk", zip file "/data/app/ca.threeohsixmedia.radio-1/split_lib_slice_7_apk.apk", zip file "/data/app/ca.threeohsixmedia.radio-1/split_lib_slice_8_apk.apk", zip file "/data/app/ca.threeohsixmedia.radio-1/split_lib_slice_9_apk.apk"],nativeLibraryDirectories=[/data/app/ca.threeohsixmedia.radio-1/lib/arm64, /data/app/ca.threeohsixmedia.radio-1/base.apk!/lib/arm64-v8a, /data/app/ca.threeohsixmedia.radio-1/split_lib_dependencies_apk.apk!/lib/arm64-v8a, /data/app/ca.threeohsixmedia.radio-1/split_lib_slice_0_apk.apk!/lib/arm64-v8a, /data/app/ca.threeohsixmedia.radio-1/split_lib_slice_1_apk.apk!/lib/arm64-v8a, /data/app/ca.threeohsixmedia.radio-1/split_lib_slice_2_apk.apk!/lib/arm64-v8a, /data/app/ca.threeohsixmedia.radio-1/split_lib_slice_3_apk.apk!/lib/arm64-v8a, /data/app/ca.threeohsixmedia.radio-1/split_lib_slice_4_apk.apk!/lib/arm64-v8a, /data/app/ca.threeohsixmedia.radio-1/split_lib_slice_5_apk.apk!/lib/arm64-v8a, /data/app/ca.threeohsixmedia.radio-1/split_lib_slice_6_apk.apk!/lib/arm64-v8a, /data/app/ca.threeohsixmedia.radio-1/split_lib_slice_7_apk.apk!/lib/arm64-v8a, /data/app/ca.threeohsixmedia.radio-1/split_lib_slice_8_apk.apk!/lib/arm64-v8a, /data/app/ca.threeohsixmedia.radio-1/split_lib_slice_9_apk.apk!/lib/arm64-v8a, /system/lib64, /vendor/lib64]]] couldn't find "libaacdecoder.so"                                                                           
at java.lang.Runtime.loadLibrary0(Runtime.java:984)                                                                              
at java.lang.System.loadLibrary(System.java:1562)                                                                                                         
at com.spoledge.aacdecoder.Decoder.loadLibrary(Decoder.java:188)                                                                              
at com.spoledge.aacdecoder.Decoder.create(Decoder.java:222)                                                                              
at com.spoledge.aacdecoder.Decoder.create(Decoder.java:199)                                                                              
at com.spoledge.aacdecoder.AACPlayer.createDecoder(AACPlayer.java:508)                                                                              
at com.spoledge.aacdecoder.MultiPlayer.createDecoder(MultiPlayer.java:91)                                                                              
at com.spoledge.aacdecoder.AACPlayer.<init>(AACPlayer.java:130)                                                                              
at com.spoledge.aacdecoder.MultiPlayer.<init>(MultiPlayer.java:81)                                                                              
at co.mobiwise.library.radio.RadioPlayerService.getPlayer(RadioPlayerService.java:424)                                                                              
at co.mobiwise.library.radio.RadioPlayerService.onCreate(RadioPlayerService.java:238)                                                                              
at android.app.ActivityThread.handleCreateService(ActivityThread.java:3192)                                                                              
at android.app.ActivityThread.-wrap5(ActivityThread.java)                                                                              
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1568)                                                                              
at android.os.Handler.dispatchMessage(Handler.java:102)                                                                              
at android.os.Looper.loop(Looper.java:154)                                                                              
at android.app.ActivityThread.main(ActivityThread.java:6121)                                                                              
at java.lang.reflect.Method.invoke(Native Method)                                                                              
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:889)                                                                              
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:779)

奇怪的是,该应用程序在Android工作室Google Pixel模拟器中运行良好,但在实际的Google Pixel硬件上却没有。我的所有文件都在正确的位置。

我试过this solution和其他许多人没有运气。我不知道从这里可以去哪里。任何帮助将不胜感激。

3 个答案:

答案 0 :(得分:0)

一个建议,因为我也遇到过同样的问题。请检查包名称是否没有任何空格。除此之外,如果您正在集成SDK,则不要更改支持类的包名称(如果开发人员使用过的话)。您可以自由更改活动类的包名称。

答案 1 :(得分:0)

您是否在app / build.gradle中添加此代码?

android {
    ...
    sourceSets {
        main {
            jniLibs.srcDirs = ['libs']
        }
    }
    ...
}

答案 2 :(得分:0)

我解决了这个问题。如果build.gradle文件位于lib文件夹中,显然使用abiFilters不起作用。