Ask Your Question
0

Problem working with Native Apps

asked 2012-11-15 10:59:43 -0500

Ranga gravatar image

updated 2012-12-17 06:23:19 -0500

Andrey Pavlenko gravatar image

When i try to run the Add Native OpenCV or any other app involving the ndk i get the following error on my phone. "The application OCV Face Detection(process org.opencv.samples.fd) has stopped unexpectedly. please try again" I installed the required apks required via google play. Please could you help me out with the problem.

This is the LogCat

12-02 17:17:28.909: I/OCVSample::Activity(23512): Instantiated new class org.opencv.samples.fd.
12-02 17:17:28.919: I/OCVSample::Activity(23512): called onCreate
12-02 17:17:28.919: I/OCVSample::Activity(23512): called onResume
12-02 17:17:28.919: I/OCVSample::Activity(23512): Trying to load OpenCV library
12-02 17:17:28.949: D/OpenCVManager/Helper(23512): Service connection created
12-02 17:17:28.949: D/OpenCVManager/Helper(23512): Trying to get library path
12-02 17:17:29.129: D/OpenCVManager/Helper(23512): Trying to get library list
12-02 17:17:29.189: D/OpenCVManager/Helper(23512): Library list: ""
12-02 17:17:29.189: D/OpenCVManager/Helper(23512): First attempt to load libs
12-02 17:17:29.189: D/OpenCVManager/Helper(23512): Trying to init OpenCV libs
12-02 17:17:29.189: D/OpenCVManager/Helper(23512): Trying to load library /data/data/org.opencv.engine/lib/libopencv_java.so
12-02 17:17:29.279: D/OpenCVManager/Helper(23512): OpenCV libs init was ok!
12-02 17:17:29.279: D/OpenCVManager/Helper(23512): First attempt to load libs is OK
12-02 17:17:29.279: D/OpenCVManager/Helper(23512): Init finished with status 0
12-02 17:17:29.279: D/OpenCVManager/Helper(23512): Unbind from service
12-02 17:17:29.279: D/OpenCVManager/Helper(23512): Calling using callback
12-02 17:17:29.289: I/OCVSample::Activity(23512): OpenCV loaded successfully
12-02 17:17:29.289: D/AndroidRuntime(23512): Shutting down VM
12-02 17:17:29.289: W/dalvikvm(23512): threadid=1: thread exiting with uncaught exception (group=0x40018578)
12-02 17:17:29.289: E/AndroidRuntime(23512): FATAL EXCEPTION: main
12-02 17:17:29.289: E/AndroidRuntime(23512): java.lang.UnsatisfiedLinkError: Couldn't load detection_based_tracker: findLibrary returned null
12-02 17:17:29.289: E/AndroidRuntime(23512):    at java.lang.Runtime.loadLibrary(Runtime.java:429)
12-02 17:17:29.289: E/AndroidRuntime(23512):    at java.lang.System.loadLibrary(System.java:554)
12-02 17:17:29.289: E/AndroidRuntime(23512):    at org.opencv.samples.fd.FdActivity$1.onManagerConnected(FdActivity.java:38)
12-02 17:17:29.289: E/AndroidRuntime(23512):    at org.opencv.android.AsyncServiceHelper$1.onServiceConnected(AsyncServiceHelper.java:206)
...
edit retag flag offensive close merge delete

Comments

1

Could report your device model and Android version?

Andrey Pavlenko gravatar imageAndrey Pavlenko ( 2012-11-16 07:30:42 -0500 )edit

My device is samsung fit and android version is 2.3.4

Ranga gravatar imageRanga ( 2012-11-18 21:54:42 -0500 )edit

i use eclipse ide

Ranga gravatar imageRanga ( 2012-11-21 09:14:35 -0500 )edit

show us logcat output.

Astor gravatar imageAstor ( 2012-11-21 12:05:47 -0500 )edit

@Astor i have posted thee logcat output

Ranga gravatar imageRanga ( 2012-12-14 03:32:49 -0500 )edit

2 answers

Sort by ยป oldest newest most voted
0

answered 2012-12-17 06:29:55 -0500

Andrey Pavlenko gravatar image

This looks like your APK doesn't include the necessary native library (detection_based_tracker) for your target platform! In particular Samsung Galaxy Fit has a ARMv6 CPU, so you need armeabi libraries, not armeabi-v7a

edit flag offensive delete link more

Comments

how do you know which value to put in APP_ABI for each device?

Israelcp gravatar imageIsraelcp ( 2013-01-21 11:25:29 -0500 )edit
Andrey Pavlenko gravatar imageAndrey Pavlenko ( 2013-01-22 02:58:47 -0500 )edit
0

answered 2013-11-19 06:46:03 -0500

Crady gravatar image

It's very possible that you haven't generate the corresponding .so file,that's 'libdetection_based_tracker.so'. If your current OS is Windows,you probably have to generate this .so file through Cygwin using orders such as 'cd' and '$NDK/ndk-build',then a file named 'libs' wiill appear in the Project,which contains 'libdetection_based_tracker.so',then you can rerun the Project.Wish it be useful for you ,good luck.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2012-11-15 10:59:43 -0500

Seen: 3,365 times

Last updated: Nov 19 '13