henryblue/MxVideoPlayer

java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader

pritesh25 opened this issue · 3 comments

on successful build , when i run my app i'm getting this error. how i can fix this issue.
thanks

09-06 18:33:31.493 20564-20564/com.selfie.life.selfielife E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.selfie.life.selfielife, PID: 20564
    java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.selfie.life.selfielife-gXibi9bPPSW96dTRVeTj2A==/base.apk", zip file "/data/app/com.selfie.life.selfielife-gXibi9bPPSW96dTRVeTj2A==/split_lib_dependencies_apk.apk", zip file "/data/app/com.selfie.life.selfielife-gXibi9bPPSW96dTRVeTj2A==/split_lib_resources_apk.apk", zip file "/data/app/com.selfie.life.selfielife-gXibi9bPPSW96dTRVeTj2A==/split_lib_slice_0_apk.apk", zip file "/data/app/com.selfie.life.selfielife-gXibi9bPPSW96dTRVeTj2A==/split_lib_slice_1_apk.apk", zip file "/data/app/com.selfie.life.selfielife-gXibi9bPPSW96dTRVeTj2A==/split_lib_slice_2_apk.apk", zip file "/data/app/com.selfie.life.selfielife-gXibi9bPPSW96dTRVeTj2A==/split_lib_slice_3_apk.apk", zip file "/data/app/com.selfie.life.selfielife-gXibi9bPPSW96dTRVeTj2A==/split_lib_slice_4_apk.apk", zip file "/data/app/com.selfie.life.selfielife-gXibi9bPPSW96dTRVeTj2A==/split_lib_slice_5_apk.apk", zip file "/data/app/com.selfie.life.selfielife-gXibi9bPPSW96dTRVeTj2A==/split_lib_slice_6_apk.apk", zip file "/data/app/com.selfie.life.selfielife-gXibi9bPPSW96dTRVeTj2A==/split_lib_slice_7_apk.apk", zip file "/data/app/com.selfie.life.selfielife-gXibi9bPPSW96dTRVeTj2A==/split_lib_slice_8_apk.apk", zip file "/data/app/com.selfie.life.selfielife-gXibi9bPPSW96dTRVeTj2A==/split_lib_slice_9_apk.apk"],nativeLibraryDirectories=[/data/app/com.selfie.life.selfielife-gXibi9bPPSW96dTRVeTj2A==/lib/arm64, /data/app/com.selfie.life.selfielife-gXibi9bPPSW96dTRVeTj2A==/base.apk!/lib/arm64-v8a, /data/app/com.selfie.life.selfielife-gXibi9bPPSW96dTRVeTj2A==/split_lib_dependencies_apk.apk!/lib/arm64-v8a, /data/app/com.selfie.life.selfielife-gXibi9bPPSW96dTRVeTj2A==/split_lib_resources_apk.apk!/lib/arm64-v8a, /data/app/com.selfie.life.selfielife-gXibi9bPPSW96dTRVeTj2A==/split_lib_slice_0_apk.apk!/lib/arm64-v8a, /data/app/com.selfie.life.selfielife-gXibi9bPPSW96dTRVeTj2A==/split_lib_slice_1_apk.apk!/lib/arm64-v8a, /data/app/com.selfie.life.selfielife-gXibi9bPPSW96dTRVeTj2A==/split_lib_slice_2_apk.apk!/lib/arm64-v8a, /data/app/com.selfie.life.selfielife-gXibi9bPPSW96dTRVeTj2A==/split_lib_slice_3_apk.apk!/lib/arm64-v8a, /data/app/com.selfie.life.selfielife-gXibi9bPPSW96dTRVeTj2A==/split_lib_slice_4_apk.apk!/lib/arm64-v8a, /data/app/com.selfie.life.selfielife-gXibi9bPPSW96dTRVeTj2A==/split_lib_slice_5_apk.apk!/lib/arm64-v8a, /data/app/com.selfie.life.selfielife-gXibi9bPPSW96dTRVeTj2A==/split_lib_slice_6_apk.apk!/lib/arm64-v8a, /data/app/com.selfie.life.selfielife-gXibi9bPPSW96dTRVeTj2A==/split_lib_slice_7_apk.apk!/lib/arm64-v8a, /data/app/com.selfie.life.selfielife-gXibi9bPPSW96dTRVeTj2A==/split_lib_slice_8_apk.apk!/lib/arm64-v8a, /data/app/com.selfie.life.selfielife-gXibi9bPPSW96dTRVeTj2A==/split_lib_slice_9_apk.apk!/lib/arm64-v8a, /system/lib64, /system/vendor/lib64]]] couldn't find "libijkffmpeg.so"
        at java.lang.Runtime.loadLibrary0(Runtime.java:1011)
        at java.lang.System.loadLibrary(System.java:1657)
        at tv.danmaku.ijk.media.player.IjkMediaPlayer$1.loadLibrary(IjkMediaPlayer.java:174)
        at tv.danmaku.ijk.media.player.IjkMediaPlayer.loadLibrariesOnce(IjkMediaPlayer.java:185)
        at tv.danmaku.ijk.media.player.IjkMediaPlayer.initPlayer(IjkMediaPlayer.java:226)
        at tv.danmaku.ijk.media.player.IjkMediaPlayer.<init>(IjkMediaPlayer.java:222)
        at tv.danmaku.ijk.media.player.IjkMediaPlayer.<init>(IjkMediaPlayer.java:213)
        at com.selfie.life.selfielife.API.Story.video.MxMediaManager.<init>(MxMediaManager.java:43)
        at com.selfie.life.selfielife.API.Story.video.MxMediaManager.getInstance(MxMediaManager.java:54)
        at com.selfie.life.selfielife.API.Story.video.MxVideoPlayer.release(MxVideoPlayer.java:699)
        at com.selfie.life.selfielife.API.Story.StatusStoriesActivity.onNext(StatusStoriesActivity.java:238)
        at com.selfie.life.selfielife.API.Story.Image.StoryStatusView$1.onAnimationEnd(StoryStatusView.java:202)
09-06 18:33:31.497 20564-20564/com.selfie.life.selfielife E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.selfie.life.selfielife, PID: 20564

you can try choose version 1.1.6, which supports 'armeabi', 'armeabi-v7a', 'arm64-v8a' 'x86' and 'x86_64', but it will make your project Larger, you can configure the type of CPU you need in your project. The configuration is as follows:

android {
........

defaultConfig {
    ........
    
    ndk {
        // config you want to support device
        abiFilters 'arm64-v8a', 'armeabi', 'armeabi-v7a', 'x86'
    }
}

}

but i created one separated project to test the library in that project i used implementation 'com.henryblue.ijkplayerlibrary:ijkplayer-java:1.0.1' this dependencies only and i work perfectly. but the moment when i deploy in my live project it start give me above error and crash my app.

can you tell me the reason ?

here is my sample project

i worked on same device.
please check my code and let me know why this run in the separated project and not run in my live project

You can try replacing " implementation 'com.henryblue.ijkplayerlibrary:ijkplayer-java:1.0.1' " with
" api 'com.henryblue.ijkplayerlibrary:ijkplayer-java:1.0.1' " my studio version is 2.3.1, i use "compile 'com.henryblue.ijkplayerlibrary:ijkplayer-java:1.0.1' . its ok