'DllImport error loading library' on API levels 15-18

JVattJVatt USMember
edited March 2015 in Xamarin.Android

I have some native C++ libraries in my project that I'm calling through PInvoke. The code runs fine on API levels 19+, but when trying to run on devices with API levels 15-18, I get an error:

DllImport error loading library '/mnt/sdcard/Android/data/my.package.name/files/.__override__/lib*.so': 'Cannot load library: find_library[1199]: 81 'lib*.so' failed to load previously'.

Checking that directory on the device I can see a bunch of .dll files that Xamarin has put there, but no *.so files. After adding the .so files manually I still receive the same error.

I have checked the .apk and the libraries are there under lib/armeabi-v7a.

Is there something wrong with the path where it's trying to load the libraries from? Running adb shell ls -l /data/data/my.package.name/lib reveals that all my .so files have been copied there, instead of the .__override__ directory.

Using the latest Xamarin Studio on Windows 7.

Sign In or Register to comment.