I am facing a situation of which I have no idea. I am trying to test a method that I
have implemented in C++, opencv and I used swig to generat the wrapper. After
compilation, when I tried to execute the application, I get an error
java.lang.UnsatisfiedLinkError.
It further states that cannot load library:reloc_library[1311]:33 cannot locate '_Z13learnFacePKcS0_'...
and suddenly throw exception. I tried
using adb shell to debug and found out that the library was in the right location (data/data/com/mesh/faceAuth/
lib/libfaceAuth.so) but it continue to crash. I will highly appreciate any candid suggestion. See the logcat below.
Regards,
Adonis.
Note:
D/dalvikvm( 401): Trying to load lib /data/data/org.vu.mesh/lib/libfaceRec.so 0x40514670
W/System.err( 401): Native code library failed to load.
W/System.err( 401): java.lang.UnsatisfiedLinkError: Cannot load library: reloc_library[1311]: 33 cannot locate '_Z13recognizeFacePKcS0_'...
W/dalvikvm( 401): Exception Ljava/lang/UnsatisfiedLinkError; thrown while initializing Lorg/vu/mesh/faceRec;
W/dalvikvm( 401): Class init failed in newInstance call (Lorg/vu/mesh/faceRec;)
D/AndroidRuntime( 401): Shutting down VM
W/dalvikvm( 401): threadid=1: thread exiting with uncaught exception (group=0x40015560)
E/AndroidRuntime( 401): FATAL EXCEPTION: main
E/AndroidRuntime( 401): java.lang.ExceptionInInitializerError
E/AndroidRuntime( 401): at java.lang.Class.newInstanceImpl(Native Method)
E/AndroidRuntime( 401): at java.lang.Class.newInstance(Class.java:1409)
E/AndroidRuntime( 401): at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
E/AndroidRuntime( 401): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1561)
E/AndroidRuntime( 401): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
E/AndroidRuntime( 401): at android.app.ActivityThread.access$1500(ActivityThread.java:117)
E/AndroidRuntime( 401): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
E/AndroidRuntime( 401): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 401): at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime( 401): at android.app.ActivityThread.main(ActivityThread.java:3683)
E/AndroidRuntime( 401): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 401): at java.lang.reflect.Method.invoke(Method.java:507)
E/AndroidRuntime( 401): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
E/AndroidRuntime( 401): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
E/AndroidRuntime( 401): at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime( 401): Caused by: java.lang.UnsatisfiedLinkError: Cannot load library: reloc_library[1311]: 33 cannot locate '_Z13recognizeFacePKcS0_'...
E/AndroidRuntime( 401):
E/AndroidRuntime( 401): at java.lang.Runtime.load(Runtime.java:394)
E/AndroidRuntime( 401): at java.lang.System.load(System.java:534)
E/AndroidRuntime( 401): at org.vu.mesh.faceRec.<clinit>(faceRec.java:674)