Trying to build LibVLCUnityPlugin for Android

101 views Asked by At

I’m trying to build the vlc plugin for unity in order to use it in a cross platform unity project. https://code.videolan.org/videolan/vlc-unity

I have already built it for windows platform, that works on unity and .exe → no problem But I have a problem to build it for android platform.

I have already built libvlc for all arch from https://code.videolan.org/videolan/vlc-android I have taken the .so files and .jar file, put it in the right folder of the unity project, but when I try to build with :

./build.sh -r -p android -a armeabi-v7a

I have this output in console :

Building for OS 'android' with target arch 'armeabi-v7a'
Android NDK: WARNING:/home/-------/Projets/android/test_vlc_android/PluginSource/jni/Android.mk:VLCUnityPlugin: non-system libraries in linker flags: -lvlc
Android NDK:     This is likely to result in incorrect builds. Try using LOCAL_STATIC_LIBRARIES
Android NDK:     or LOCAL_SHARED_LIBRARIES instead to list the library dependencies of the
Android NDK:     current module[armeabi-v7a] Prebuilt       : libvlc.so <= jni/..//..//Assets/VLCUnity/Plugins/Android/libs/armeabi-v7a/
[armeabi-v7a] Install        : libvlc.so => libs/armeabi-v7a/libvlc.so
[armeabi-v7a] Compile++ arm  : VLCUnityPlugin <= RenderAPI.cpp
[armeabi-v7a] Compile++ arm  : VLCUnityPlugin <= RenderingPlugin.cpp
[armeabi-v7a] Compile++ arm  : VLCUnityPlugin <= RenderAPI_Android.cpp
[armeabi-v7a] Compile++ arm  : VLCUnityPlugin <= Log.cpp
[armeabi-v7a] Compile++ arm  : VLCUnityPlugin <= RenderAPI_OpenGLBase.cpp
[armeabi-v7a] Compile++ arm  : VLCUnityPlugin <= RenderAPI_OpenGLEGL.cpp
[armeabi-v7a] Prebuilt       : libc++_shared.so <= <NDK>/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/arm-linux-androideabi/
[armeabi-v7a] SharedLibrary  : libVLCUnityPlugin.so
[armeabi-v7a] Install        : libVLCUnityPlugin.so => libs/armeabi-v7a/libVLCUnityPlugin.so
[armeabi-v7a] Install        : libc++_shared.so => libs/armeabi-v7a/libc++_shared.so

and a libVLCUnityPlugin.so file of only 22 ko that doesn’t work.

I suppose cause of the warning message, I lack some part of vlclib in my generated file. Does anyone have a solution or some tips to achieve the building process ?

My building environment : Ubuntu 22.04.2 LTS, android ndk r25c

0

There are 0 answers