In my java class I have this:
static
{
System.loadLibrary("c++_shared");
System.loadLibrary("com.testandroid.LibAndroidBridge");
}
And my Application.mk has this:
NDK_TOOLCHAIN_VERSION:=4.8
APP_STL := c++_shared
APP_ABI := x86
Things build fine, but when I run the app (on emulator or device, so x85 and arm) I get this in LogCat:
02-13 12:00:32.174: D/dalvikvm(2142): Trying to load lib /data/app-lib/com.testandroid-1/libc++_shared.so 0xb0fcfc60
02-13 12:00:32.174: D/dalvikvm(2142): Added shared lib /data/app-lib/com.testandroid-1/libc++_shared.so 0xb0fcfc60
02-13 12:00:32.174: D/dalvikvm(2142): No JNI_OnLoad found in /data/app-lib/com.testandroid-1/libc++_shared.so 0xb0fcfc60, skipping init
02-13 12:00:32.174: D/dalvikvm(2142): Trying to load lib /data/app-lib/com.testandroid-1/libcom.testandroid.LibAndroidBridge.so 0xb0fcfc60
02-13 12:00:32.174: E/dalvikvm(2142): dlopen("/data/app-lib/com.testandroid-1/libcom.testandroid.LibAndroidBridge.so") failed: dlopen failed: cannot locate symbol "rand" referenced by "libcom.testandroid.LibAndroidBridge.so"...
02-13 12:00:32.174: W/dalvikvm(2142): Exception Ljava/lang/UnsatisfiedLinkError; thrown while initializing Lcom/testandroid/AriesLib;
02-13 12:00:32.174: D/AndroidRuntime(2142): Shutting down VM
02-13 12:00:32.174: W/dalvikvm(2142): threadid=1: thread exiting with uncaught exception (group=0xb0cb0b20)
02-13 12:00:32.174: E/AndroidRuntime(2142): FATAL EXCEPTION: main
02-13 12:00:32.174: E/AndroidRuntime(2142): Process: com.testandroid, PID: 2142
02-13 12:00:32.174: E/AndroidRuntime(2142): java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "rand" referenced by "libcom.testandroid.LibAndroidBridge.so"...
02-13 12:00:32.174: E/AndroidRuntime(2142): at java.lang.Runtime.loadLibrary(Runtime.java:364)
Would anyone know why this is failing to import the c++_shared.so library?