In a Xamarin Solution
, I have:
Project 1: An
Android
application project (application). I had an oldAndroid
application using three.so
, built asAndroidNativeLibrary
. This worked well and.so
were found. I wanted to make a library from it. For this reason, I've made a newLibrary
project. Now, in my solution, I have this second project:Project 2: A
Library
project with.so
built asEmbeddedNativeLibrary
. This is not working. TheDLL
doesn't contain the.so
nor the.so
are copied to the Android application project refering to it. (I don't know what is the usual process to put them in the/lib
folder of application during the build process) So the .so libs are just nowhere,Dalvik
doesn't find it. I know that it will work if I directly put them in the application project, but this is an ugly solution.
It seems to me that EmbeddedNativeLibrary
, judging by the name, should help in my case. But it has no effect.
How can I have my .so
files embedded in a .DLL
Library
or automatically copied in the application /lib
directory?
[EDIT]
I should have verified before, but the libs are really included in the APK. They are just not found when running the application. Just like missing or wrongly referenced libraries. Maybe there's an extra step to make them visible?
[Mono] DllImport attempting to load: 'libffmpeg.so'.
[Mono] DllImport error loading library '/storage/sdcard0/Android/data/com.pure.ffmpeg/
files/.__override__/libffmpeg.so': 'Cannot load library:
load_library[1093]: Library '/data/data/com.pure.ffmpeg/lib//storage/sdcard0/Android/
data/com.pure.ffmpeg/files/.__override__/libffmpeg.so' not found'.
[Mono] DllImport error loading library
'/storage/sdcard0/Android/data/com.pure.ffmpeg/files/.__override__/libffmpeg.so':
'Cannot load library: load_library[1093]: Library '/data/data/com.pure.ffmpeg/
lib//storage/sdcard0/Android/data/com.pure.ffmpeg/files/.__override__/libffmpeg.so'
not found'.
[Mono] DllImport error loading library 'libffmpeg.so':
'Cannot load library:
load_library[1093]: Library '/data/data/com.pure.ffmpeg/lib/libffmpeg.so' not found'.
[Mono] DllImport error loading library 'libffmpeg.so': 'Cannot
load library: load_library[1093]: Library '/data/data/com.pure.ffmpeg/lib/libffmpeg.so' not found'.
[Mono] DllImport error loading library 'libffmpeg.so': 'Cannot
load library: load_library[1093]: Library '/data/data/com.pure.ffmpeg/lib/libffmpeg.so' not found'.
[Mono] DllImport unable to load library 'Cannot load library: load_library[1093]:
Library '/data/data/com.pure.ffmpeg/lib/libffmpeg.so' not found'.