Closed Allier closed 7 years ago
Make sure your output apk does in fact contain the necessary library files (*.so) in /jni/$ARCH/
Yes, it does contain liblvc.so and libvlcjni.so among others
@Allier, you solved?
@eseffair Yes, my fault, there were another .so build in a project, thanks for responce
Could someone please post his build.gradle and folder structure? My *.so are in the folder /lib/ in the apk
My build.gradle
.... sourceSets { main { assets.srcDirs = ['src/main/assets', 'src/main/assets/'] jni { srcDirs = [] } jniLibs { srcDir 'src/main/jniLibs' } } } } repositories { mavenCentral() } allprojects { repositories { jcenter() flatDir { dirs 'lib' } } } dependencies { compile fileTree(include: ['*.jar'], dir: 'libs') compile 'com.anjlab.android.iab.v3:library:1.0.+@aar' compile 'com.android.support:appcompat-v7:25.0.0' compile 'com.android.support:design:25.0.0' compile 'com.github.hotchemi:permissionsdispatcher:2.3.2' annotationProcessor 'com.github.hotchemi:permissionsdispatcher-processor:2.3.2' compile 'com.squareup.okhttp3:okhttp:3.6.0' //compile(name:'libvlc_3.0.0', ext:'jar') // androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.2' compile "de.mrmaffen:vlc-android-sdk:2.0.6" }
Solved. Added missing:
static { System.loadLibrary("vlc"); System.loadLibrary("vlcjni"); }
When I try to use libVLC from your dependency my app crashes with:
Caused by: java.lang.UnsatisfiedLinkError: No implementation found for void org.videolan.libvlc.LibVLC.nativeNew(java.lang.String[], java.lang.String) (tried Java_org_videolan_libvlc_LibVLC_nativeNew and Java_org_videolan_libvlc_LibVLC_nativeNew___3Ljava_lang_String_2Ljava_lang_String_2) at org.videolan.libvlc.LibVLC.nativeNew(Native Method) at org.videolan.libvlc.LibVLC.
what's the solution ?? had anyone solved the problem? @kpurushottam @mrmaffen @mrmaffen where do i put that code of you?
When I try to use libVLC from your dependency my app crashes with:
Caused by: java.lang.UnsatisfiedLinkError: No implementation found for void org.videolan.libvlc.LibVLC.nativeNew(java.lang.String[], java.lang.String) (tried Java_org_videolan_libvlc_LibVLC_nativeNew and Java_org_videolan_libvlc_LibVLC_nativeNew___3Ljava_lang_String_2Ljava_lang_String_2) at org.videolan.libvlc.LibVLC.nativeNew(Native Method) at org.videolan.libvlc.LibVLC.<init>(LibVLC.java:82)
Maybe I miss something? I just usecompile 'de.mrmaffen:vlc-android-sdk:2.0.6'
in my Gradle dependency