cine-io / cineio-broadcast-android

The cine.io Android Broadcast SDK
https://www.cine.io/products/broadcast
MIT License
52 stars 32 forks source link

java.lang.UnsatisfiedLinkError: could not load library "libavcodec-55.so" #17

Closed sirvon closed 9 years ago

sirvon commented 9 years ago

Encountered an error while attempting to run this code off a button press:

        String SECRET_KEY = "xxxxxxxxx";
        CineIoConfig config = new CineIoConfig();
        config.setSecretKey(SECRET_KEY);
        CineIoClient client = new CineIoClient(config);
        String streamId = "xxxxxxxxxxxx";
        client.broadcast(streamId, this);

Here's the full error:

04:44:53.383    8039-8039/com.apps.default W/dalvikvm﹕ VFY: unable to find class referenced in signature (Lcom/google/common/eventbus/EventBus;)
04-01 04:44:53.383    8039-8039/com.apps.default D/dalvikvm﹕ Trying to load lib /data/app-lib/com.apps.default-2/libffmpegbridge.so 0x426c19a8
04-01 04:44:53.383    8039-8039/com.apps.default E/dalvikvm﹕ dlopen("/data/app-lib/com.apps.default-2/libffmpegbridge.so") failed: dlopen failed: could not load library "libavcodec-55.so" needed by "libffmpegbridge.so"; caused by library "libavcodec-55.so" not found
04-01 04:44:53.383    8039-8039/com.apps.default W/dalvikvm﹕ Exception Ljava/lang/UnsatisfiedLinkError; thrown while initializing Lio/cine/ffmpegbridge/FFmpegBridge;
04-01 04:44:53.383    8039-8039/com.apps.default D/AndroidRuntime﹕ Shutting down VM
04-01 04:44:53.383    8039-8039/com.apps.default W/dalvikvm﹕ threadid=1: thread exiting with uncaught exception (group=0x42062e48)
04-01 04:44:53.733    8039-8039/com.apps.default E/AndroidRuntime﹕ FATAL EXCEPTION: main
    Process: com.apps.default, PID: 8039
    java.lang.UnsatisfiedLinkError: dlopen failed: could not load library "libavcodec-55.so" needed by "libffmpegbridge.so"; caused by library "libavcodec-55.so" not found
            at java.lang.Runtime.loadLibrary(Runtime.java:364)
            at java.lang.System.loadLibrary(System.java:526)
            at io.cine.ffmpegbridge.FFmpegBridge.<clinit>(FFmpegBridge.java:35)
            at io.cine.android.streaming.FFmpegMuxer.<init>(FFmpegMuxer.java:56)
            at io.cine.android.BroadcastActivity.initializeMuxer(BroadcastActivity.java:206)
            at io.cine.android.BroadcastActivity.onCreate(BroadcastActivity.java:158)
            at android.app.Activity.performCreate(Activity.java:5275)
            at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
            at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2166)
            at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2252)
            at android.app.ActivityThread.access$800(ActivityThread.java:139)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1200)
            at android.os.Handler.dispatchMessage(Handler.java:102)
            at android.os.Looper.loop(Looper.java:136)
            at android.app.ActivityThread.main(ActivityThread.java:5103)
            at java.lang.reflect.Method.invokeNative(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:515)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:790)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:606)
            at dalvik.system.NativeStart.main(Native Method)

Could possibly be due to the fact I'm using multidex, this has happened with Jnis/ndk libs before....This time I must find a solution.

sirvon commented 9 years ago

I unpacked the apk....it's there... maybe its not in the right folder for this particular phone?

├── arm64-v8a │   └── libtightdb-jni.so ├── armeabi │   ├── libavcodec-55.so │   ├── libavdevice-55.so │   ├── libavfilter-4.so │   ├── libavformat-55.so │   ├── libavutil-52.so │   ├── libcrypto.so │   ├── libfb_jpegturbo.so │   ├── libfb_png.so │   ├── libffmpegbridge.so │   ├── libgifimage.so │   ├── libgif.so │   ├── libgnustl_shared.so │   ├── libimagepipeline.so │   ├── libImmEmulatorJ.so │   ├── libmemchunk.so │   ├── librtmp-1.so │   ├── libsnappydb-native.so │   ├── libssl.so │   ├── libswresample-0.so │   ├── libswscale-2.so │   ├── libtightdb-jni.so │   ├── libwebpimage.so │   └── libwebp.so ├── armeabi-v7a │   ├── libfb_jpegturbo.so │   ├── libfb_png.so │   ├── libgifimage.so │   ├── libgif.so │   ├── libgnustl_shared.so │   ├── libimagepipeline.so │   ├── libmemchunk.so │   ├── libsnappydb-native.so │   ├── libtightdb-jni.so │   ├── libwebpimage.so │   └── libwebp.so ├── mips │   ├── libsnappydb-native.so │   └── libtightdb-jni.so └── x86 ├── libfb_jpegturbo.so ├── libfb_png.so ├── libgifimage.so ├── libgif.so ├── libgnustl_shared.so ├── libimagepipeline.so ├── libmemchunk.so ├── libsnappydb-native.so ├── libtightdb-jni.so ├── libwebpimage.so └── libwebp.so

sirvon commented 9 years ago

fixed it by adding armeabi-v7a dir with same .so files from armeabi dir to jniLibs dir

made a pull request: https://github.com/cine-io/cineio-broadcast-android/commit/5fbc0295904c14753fa22f98bff884b7071d8dec