Libvlc android cant load libs

I tried to run the libvlc.I example and compiled vlc for android and copied the sdk library to the project as they wrote. https://bitbucket.org/edwardcw/libvlc-android-sample

and i get this error

1236-1236/com.compdigitec.libvlcandroidsample E/VLC/LibVLC﹕ Can't load vlcjni library: java.lang.UnsatisfiedLinkError: Couldn't load vlcjni from loader dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.compdigitec.libvlcandroidsample-1.apk"],nativeLibraryDirectories=[/data/app-lib/com.compdigitec.libvlcandroidsample-1, /system/lib]]]: findLibrary returned null 

in these lines their task

  try { System.loadLibrary("vlcjni"); } catch (UnsatisfiedLinkError ule) { Log.e(TAG, "Can't load vlcjni library: " + ule); /// FIXME Alert user System.exit(1); } 

under libs / armeabi-v7a I have these files

 gdb.setup gbdserver libiomx-hc.so libiomx-gingerbread.so libiomx-ics.so libvlcjni.so 

I think the .so files are not uploaded. How can i fix this?

I checked apk files and there are no dic libs. or any of the libvlc files.

this is my build.gradle file

  apply plugin: 'com.android.application' android { compileSdkVersion 19 buildToolsVersion "20.0.0" defaultConfig { applicationId "com.compdigitec.libvlcandroidsample" minSdkVersion 7 targetSdkVersion 17 } buildTypes { release { runProguard false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt' } debug { } } } dependencies { compile 'com.android.support:support-v4:18.0.0' } 

thanks

+5
source share
2 answers

After a long night, I found a solution, so if someone needs this:

  • I put the lib directory in a zip file.

  • the name has changed to .jar.

  • go to File ->project structure -> dependencies -> , then add the jar file.

and then it works.

+3
source

I moved the contents of the jnilibs folder to the libs folder and executed it

+1
source

Source: https://habr.com/ru/post/1203829/


All Articles