Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Android app works on 4.3 and above only

Hi,

I have an OpenCV Android app (Qt based). It works for versions 4.3 and above but fails for others. The specific error being it is not able to find the libraries libopencv_java.so and libopencv_info.so, though the same APK works on the specified versions. I have already specified the min sdk as 14 and target sdk as "not set" in AndroidManifest.xml. Also the NDK points to platform 16 (Android 4.0.3). Not sure what's creating this problem.

Thanks

Android app works on 4.3 and above only

Hi,

I have an OpenCV Android app (Qt based). It works for versions 4.3 and above but fails for others. The specific error being it is not able to find the libraries libopencv_java.so and libopencv_info.so, though the same APK works on the specified versions. I have already specified the min sdk as 14 and target sdk as "not set" in AndroidManifest.xml. Also the NDK points to platform 16 (Android 4.0.3). Not sure what's creating this problem.

Attaching stacktrace,

W/dalvikvm(  744): threadid=1: thread exiting with uncaught exception (group=0x40a13300)
E/AndroidRuntime(  744): FATAL EXCEPTION: main
E/AndroidRuntime(  744): java.lang.UnsatisfiedLinkError: Cannot load library: link_image[1891]:    37 could not load needed library 'libopencv_info.so' for 'libTrackerDemo.so' (load_library[1093]: Library 'libopencv_info.so' not found)
E/AndroidRuntime(  744):    at java.lang.Runtime.loadLibrary(Runtime.java:370)
E/AndroidRuntime(  744):    at java.lang.System.loadLibrary(System.java:535)
E/AndroidRuntime(  744):    at org.qtproject.qt5.android.bindings.QtActivity.loadApplication(QtActivity.java:255)
E/AndroidRuntime(  744):    at org.qtproject.qt5.android.bindings.QtActivity.startApp(QtActivity.java:649)
E/AndroidRuntime(  744):    at org.qtproject.qt5.android.bindings.QtActivity.onCreate(QtActivity.java:880)
E/AndroidRuntime(  744):    at android.app.Activity.performCreate(Activity.java:5008)
E/AndroidRuntime(  744):    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)
E/AndroidRuntime(  744):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2023)
E/AndroidRuntime(  744):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084)
E/AndroidRuntime(  744):    at android.app.ActivityThread.access$600(ActivityThread.java:130)
E/AndroidRuntime(  744):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195)
E/AndroidRuntime(  744):    at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime(  744):    at android.os.Looper.loop(Looper.java:137)
E/AndroidRuntime(  744):    at android.app.ActivityThread.main(ActivityThread.java:4745)
E/AndroidRuntime(  744):    at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime(  744):    at java.lang.reflect.Method.invoke(Method.java:511)
E/AndroidRuntime(  744):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
E/AndroidRuntime(  744):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
E/AndroidRuntime(  744):    at dalvik.system.NativeStart.main(Native Method)
I/Process (  744): Sending signal. PID: 744 SIG: 9

Thanks

click to hide/show revision 3
retagged

updated 2014-09-16 14:09:01 -0600

berak gravatar image

Android app works on 4.3 and above only

Hi,

I have an OpenCV Android app (Qt based). It works for versions 4.3 and above but fails for others. The specific error being it is not able to find the libraries libopencv_java.so and libopencv_info.so, though the same APK works on the specified versions. I have already specified the min sdk as 14 and target sdk as "not set" in AndroidManifest.xml. Also the NDK points to platform 16 (Android 4.0.3). Not sure what's creating this problem.

Attaching stacktrace,

W/dalvikvm(  744): threadid=1: thread exiting with uncaught exception (group=0x40a13300)
E/AndroidRuntime(  744): FATAL EXCEPTION: main
E/AndroidRuntime(  744): java.lang.UnsatisfiedLinkError: Cannot load library: link_image[1891]:    37 could not load needed library 'libopencv_info.so' for 'libTrackerDemo.so' (load_library[1093]: Library 'libopencv_info.so' not found)
E/AndroidRuntime(  744):    at java.lang.Runtime.loadLibrary(Runtime.java:370)
E/AndroidRuntime(  744):    at java.lang.System.loadLibrary(System.java:535)
E/AndroidRuntime(  744):    at org.qtproject.qt5.android.bindings.QtActivity.loadApplication(QtActivity.java:255)
E/AndroidRuntime(  744):    at org.qtproject.qt5.android.bindings.QtActivity.startApp(QtActivity.java:649)
E/AndroidRuntime(  744):    at org.qtproject.qt5.android.bindings.QtActivity.onCreate(QtActivity.java:880)
E/AndroidRuntime(  744):    at android.app.Activity.performCreate(Activity.java:5008)
E/AndroidRuntime(  744):    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)
E/AndroidRuntime(  744):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2023)
E/AndroidRuntime(  744):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084)
E/AndroidRuntime(  744):    at android.app.ActivityThread.access$600(ActivityThread.java:130)
E/AndroidRuntime(  744):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195)
E/AndroidRuntime(  744):    at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime(  744):    at android.os.Looper.loop(Looper.java:137)
E/AndroidRuntime(  744):    at android.app.ActivityThread.main(ActivityThread.java:4745)
E/AndroidRuntime(  744):    at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime(  744):    at java.lang.reflect.Method.invoke(Method.java:511)
E/AndroidRuntime(  744):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
E/AndroidRuntime(  744):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
E/AndroidRuntime(  744):    at dalvik.system.NativeStart.main(Native Method)
I/Process (  744): Sending signal. PID: 744 SIG: 9

Thanks

Android app works on 4.3 and above only

Hi,

I have an OpenCV Android app (Qt based). It works for versions 4.3 and above but fails for others. The specific error being it is not able to find the libraries libopencv_java.so and libopencv_info.so, though the same APK works on the specified versions. I have already specified the min sdk as 14 and target sdk as "not set" in AndroidManifest.xml. Also the NDK points to platform 16 (Android 4.0.3). Not sure what's creating this problem.

Attaching stacktrace,

Starting remote process.D/dalvikvm(  884): Not late-enabling CheckJNI (already on)
E/Trace   (  884): error opening trace file: No such file or directory (2)
D/dalvikvm(  884): GC_CONCURRENT freed 210K, 10% free 5467K/6023K, paused 16ms+3ms, total 78ms
D/dalvikvm(  884): GC_CONCURRENT freed 340K, 12% free 5526K/6215K, paused 14ms+3ms, total 61ms
D/dalvikvm(  884): GC_CONCURRENT freed 395K, 12% free 5539K/6279K, paused 15ms+40ms, total 129ms
D/dalvikvm(  884): Trying to load lib /data/data/org.qtproject.example.TrackerDemo/lib/libgnustl_shared.so 0x40f7a6e0
D/dalvikvm(  884): Added shared lib /data/data/org.qtproject.example.TrackerDemo/lib/libgnustl_shared.so 0x40f7a6e0
D/dalvikvm(  884): No JNI_OnLoad found in /data/data/org.qtproject.example.TrackerDemo/lib/libgnustl_shared.so 0x40f7a6e0, skipping init
D/dalvikvm(  884): Trying to load lib /data/data/org.qtproject.example.TrackerDemo/lib/libQt5Core.so 0x40f7a6e0
D/dalvikvm(  884): Added shared lib /data/data/org.qtproject.example.TrackerDemo/lib/libQt5Core.so 0x40f7a6e0
D/dalvikvm(  884): Trying to load lib /data/data/org.qtproject.example.TrackerDemo/lib/libQt5Network.so 0x40f7a6e0
D/dalvikvm(  884): Added shared lib /data/data/org.qtproject.example.TrackerDemo/lib/libQt5Network.so 0x40f7a6e0
I/Qt      (  884): Network start
D/dalvikvm(  884): Trying to load lib /data/data/org.qtproject.example.TrackerDemo/lib/libQt5Qml.so 0x40f7a6e0
D/dalvikvm(  884): Added shared lib /data/data/org.qtproject.example.TrackerDemo/lib/libQt5Qml.so 0x40f7a6e0
D/dalvikvm(  884): No JNI_OnLoad found in /data/data/org.qtproject.example.TrackerDemo/lib/libQt5Qml.so 0x40f7a6e0, skipping init
D/dalvikvm(  884): Trying to load lib /data/data/org.qtproject.example.TrackerDemo/lib/libQt5Gui.so 0x40f7a6e0
D/dalvikvm(  884): Added shared lib /data/data/org.qtproject.example.TrackerDemo/lib/libQt5Gui.so 0x40f7a6e0
D/dalvikvm(  884): No JNI_OnLoad found in /data/data/org.qtproject.example.TrackerDemo/lib/libQt5Gui.so 0x40f7a6e0, skipping init
D/dalvikvm(  884): Trying to load lib /data/data/org.qtproject.example.TrackerDemo/lib/libQt5Quick.so 0x40f7a6e0
D/dalvikvm(  884): Added shared lib /data/data/org.qtproject.example.TrackerDemo/lib/libQt5Quick.so 0x40f7a6e0
D/dalvikvm(  884): No JNI_OnLoad found in /data/data/org.qtproject.example.TrackerDemo/lib/libQt5Quick.so 0x40f7a6e0, skipping init
D/dalvikvm(  884): Trying to load lib /data/data/org.qtproject.example.TrackerDemo/lib/libQt5QuickParticles.so 0x40f7a6e0
D/dalvikvm(  884): Added shared lib /data/data/org.qtproject.example.TrackerDemo/lib/libQt5QuickParticles.so 0x40f7a6e0
D/dalvikvm(  884): No JNI_OnLoad found in /data/data/org.qtproject.example.TrackerDemo/lib/libQt5QuickParticles.so 0x40f7a6e0, skipping init
D/dalvikvm(  884): Trying to load lib /data/data/org.qtproject.example.TrackerDemo/lib/libQt5XmlPatterns.so 0x40f7a6e0
D/dalvikvm(  884): Added shared lib /data/data/org.qtproject.example.TrackerDemo/lib/libQt5XmlPatterns.so 0x40f7a6e0
D/dalvikvm(  884): No JNI_OnLoad found in /data/data/org.qtproject.example.TrackerDemo/lib/libQt5XmlPatterns.so 0x40f7a6e0, skipping init
D/dalvikvm(  884): Trying to load lib /data/data/org.qtproject.example.TrackerDemo/lib/libQt5Widgets.so 0x40f7a6e0
D/dalvikvm(  884): Added shared lib /data/data/org.qtproject.example.TrackerDemo/lib/libQt5Widgets.so 0x40f7a6e0
D/dalvikvm(  884): No JNI_OnLoad found in /data/data/org.qtproject.example.TrackerDemo/lib/libQt5Widgets.so 0x40f7a6e0, skipping init
D/dalvikvm(  884): Trying to load lib /data/data/org.qtproject.example.TrackerDemo/lib/libQt5Sql.so 0x40f7a6e0
D/dalvikvm(  884): Added shared lib /data/data/org.qtproject.example.TrackerDemo/lib/libQt5Sql.so 0x40f7a6e0
D/dalvikvm(  884): No JNI_OnLoad found in /data/data/org.qtproject.example.TrackerDemo/lib/libQt5Sql.so 0x40f7a6e0, skipping init
D/dalvikvm(  884): Trying to load lib /data/data/org.qtproject.example.TrackerDemo/lib/libQt5Script.so 0x40f7a6e0
D/dalvikvm(  884): Added shared lib /data/data/org.qtproject.example.TrackerDemo/lib/libQt5Script.so 0x40f7a6e0
D/dalvikvm(  884): No JNI_OnLoad found in /data/data/org.qtproject.example.TrackerDemo/lib/libQt5Script.so 0x40f7a6e0, skipping init
D/dalvikvm(  884): Trying to load lib /data/data/org.qtproject.example.TrackerDemo/lib/libQt5Declarative.so 0x40f7a6e0
D/dalvikvm(  884): Added shared lib /data/data/org.qtproject.example.TrackerDemo/lib/libQt5Declarative.so 0x40f7a6e0
D/dalvikvm(  884): No JNI_OnLoad found in /data/data/org.qtproject.example.TrackerDemo/lib/libQt5Declarative.so 0x40f7a6e0, skipping init
D/dalvikvm(  884): Trying to load lib /data/data/org.qtproject.example.TrackerDemo/lib/libQt5Svg.so 0x40f7a6e0
D/dalvikvm(  884): Added shared lib /data/data/org.qtproject.example.TrackerDemo/lib/libQt5Svg.so 0x40f7a6e0
D/dalvikvm(  884): No JNI_OnLoad found in /data/data/org.qtproject.example.TrackerDemo/lib/libQt5Svg.so 0x40f7a6e0, skipping init
D/dalvikvm(  884): Trying to load lib /data/data/org.qtproject.example.TrackerDemo/lib/libQt5OpenGL.so 0x40f7a6e0
D/dalvikvm(  884): Added shared lib /data/data/org.qtproject.example.TrackerDemo/lib/libQt5OpenGL.so 0x40f7a6e0
D/dalvikvm(  884): No JNI_OnLoad found in /data/data/org.qtproject.example.TrackerDemo/lib/libQt5OpenGL.so 0x40f7a6e0, skipping init
D/dalvikvm(  884): Trying to load lib /data/data/org.qtproject.example.TrackerDemo/lib/libQt5Multimedia.so 0x40f7a6e0
D/dalvikvm(  884): Added shared lib /data/data/org.qtproject.example.TrackerDemo/lib/libQt5Multimedia.so 0x40f7a6e0
D/dalvikvm(  884): No JNI_OnLoad found in /data/data/org.qtproject.example.TrackerDemo/lib/libQt5Multimedia.so 0x40f7a6e0, skipping init
D/dalvikvm(  884): Trying to load lib /data/data/org.qtproject.example.TrackerDemo/lib/libQt5MultimediaQuick_p.so 0x40f7a6e0
D/dalvikvm(  884): Added shared lib /data/data/org.qtproject.example.TrackerDemo/lib/libQt5MultimediaQuick_p.so 0x40f7a6e0
D/dalvikvm(  884): No JNI_OnLoad found in /data/data/org.qtproject.example.TrackerDemo/lib/libQt5MultimediaQuick_p.so 0x40f7a6e0, skipping init
D/dalvikvm(  884): Trying to load lib /data/data/org.qtproject.example.TrackerDemo/lib/libQt5Xml.so 0x40f7a6e0
D/dalvikvm(  884): Added shared lib /data/data/org.qtproject.example.TrackerDemo/lib/libQt5Xml.so 0x40f7a6e0
D/dalvikvm(  884): No JNI_OnLoad found in /data/data/org.qtproject.example.TrackerDemo/lib/libQt5Xml.so 0x40f7a6e0, skipping init
D/dalvikvm(  884): Trying to load lib /data/data/org.qtproject.example.TrackerDemo/qt-reserved-files/plugins/platforms/android/libqtforandroid.so 0x40f7a6e0
D/dalvikvm(  884): Added shared lib /data/data/org.qtproject.example.TrackerDemo/qt-reserved-files/plugins/platforms/android/libqtforandroid.so 0x40f7a6e0
I/Qt      (  884): qt start
D/dalvikvm(  884): Trying to load lib /data/data/org.qtproject.example.TrackerDemo/lib/libQt5QuickParticles.so 0x40f7a6e0
D/dalvikvm(  884): Shared lib '/data/data/org.qtproject.example.TrackerDemo/lib/libQt5QuickParticles.so' already loaded in same CL 0x40f7a6e0
D/dalvikvm(  884): Trying to load lib /data/data/org.qtproject.example.TrackerDemo/qt-reserved-files/plugins/mediaservice/libqtmedia_android.so 0x40f7a6e0
D/dalvikvm(  884): Added shared lib /data/data/org.qtproject.example.TrackerDemo/qt-reserved-files/plugins/mediaservice/libqtmedia_android.so 0x40f7a6e0
D/dalvikvm(  884): Trying to load lib /data/data/org.qtproject.example.TrackerDemo/lib/libQt5MultimediaQuick_p.so 0x40f7a6e0
D/dalvikvm(  884): Shared lib '/data/data/org.qtproject.example.TrackerDemo/lib/libQt5MultimediaQuick_p.so' already loaded in same CL 0x40f7a6e0
D/dalvikvm(  884): Trying to load lib /data/data/org.qtproject.example.TrackerDemo/lib/libTrackerDemo.so 0x40f7a6e0
D/AndroidRuntime(  884): Shutting down VM    
W/dalvikvm(  744): threadid=1: thread exiting with uncaught exception (group=0x40a13300)
 E/AndroidRuntime(  744): FATAL EXCEPTION: main
 E/AndroidRuntime(  744): java.lang.UnsatisfiedLinkError: Cannot load library: link_image[1891]:    37 could not load needed library 'libopencv_info.so' for 'libTrackerDemo.so' (load_library[1093]: Library 'libopencv_info.so' not found)
 E/AndroidRuntime(  744):    at java.lang.Runtime.loadLibrary(Runtime.java:370)
 E/AndroidRuntime(  744):    at java.lang.System.loadLibrary(System.java:535)
 E/AndroidRuntime(  744):    at org.qtproject.qt5.android.bindings.QtActivity.loadApplication(QtActivity.java:255)
 E/AndroidRuntime(  744):    at org.qtproject.qt5.android.bindings.QtActivity.startApp(QtActivity.java:649)
 E/AndroidRuntime(  744):    at org.qtproject.qt5.android.bindings.QtActivity.onCreate(QtActivity.java:880)
 E/AndroidRuntime(  744):    at android.app.Activity.performCreate(Activity.java:5008)
 E/AndroidRuntime(  744):    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)
 E/AndroidRuntime(  744):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2023)
 E/AndroidRuntime(  744):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084)
 E/AndroidRuntime(  744):    at android.app.ActivityThread.access$600(ActivityThread.java:130)
 E/AndroidRuntime(  744):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195)
 E/AndroidRuntime(  744):    at android.os.Handler.dispatchMessage(Handler.java:99)
 E/AndroidRuntime(  744):    at android.os.Looper.loop(Looper.java:137)
 E/AndroidRuntime(  744):    at android.app.ActivityThread.main(ActivityThread.java:4745)
 E/AndroidRuntime(  744):    at java.lang.reflect.Method.invokeNative(Native Method)
 E/AndroidRuntime(  744):    at java.lang.reflect.Method.invoke(Method.java:511)
 E/AndroidRuntime(  744):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
 E/AndroidRuntime(  744):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
 E/AndroidRuntime(  744):    at dalvik.system.NativeStart.main(Native Method)
 I/Process (  744): Sending signal. PID: 744 SIG: 9

Thanks