Skip to content Skip to sidebar Skip to footer

Unsatisfiedlinkerror: ... :findlibrary Returned Null

03-01 14:00:53.556: E/AndroidRuntime(27208): java.lang.UnsatisfiedLinkError: Couldn't load example from loader dalvik.system.PathClassLoader[DexPathList[[zip file '/data/app/com.e

Solution 1:

The right way of loading the shared library is

static {
    System.loadLibrary("test");
}

The library name is taken from the LOCAL_MODULE definition of your Android.mk file (or from the Application.mk file, if you decide to use it). In your case, you are naming your module test. The ndk-build generates the shared library libtest.so.

Pay attention that you do not need to include the lib- prefix in the System.loadLibrary() call.

Post a Comment for "Unsatisfiedlinkerror: ... :findlibrary Returned Null"