Ask Your Question

zehemz's profile - activity

2017-12-14 23:36:05 -0600 received badge  Notable Question (source)
2016-06-27 11:41:44 -0600 received badge  Popular Question (source)
2015-06-08 10:28:03 -0600 received badge  Student (source)
2015-05-08 15:26:24 -0600 received badge  Editor (source)
2015-05-08 14:55:14 -0600 asked a question package not found - issue building libdetection_based_tracker.so

Hi there! I'm trying to run face-detection sample over Android Studio (on windows...) I'm testing the app in a MotoG (ARM) and the following Application and Android mk.

in my project I have: src\main\libs\armeabi-v7a\ but just the file libdetection_based_tracker.so

LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
#OPENCV_CAMERA_MODULES:=off
#OPENCV_INSTALL_MODULES:=off
#OPENCV_LIB_TYPE:=SHARED
include C:\Users\lbais\Documents\OpenCV-android-sdk\sdk\native\jni\OpenCV.mk
LOCAL_SRC_FILES  := DetectionBasedTracker_jni.cpp
LOCAL_C_INCLUDES += $(LOCAL_PATH)
LOCAL_LDLIBS     += -llog -ldl
LOCAL_MODULE     := detection_based_tracker
include $(BUILD_SHARED_LIBRARY)

Compile output:

C:\Users\lbais\Documents\face-detection\openCVSamplefacedetection\src\main\jni>n
dk-build
Android NDK: WARNING:C:/Users/lbais/Documents/face-detection/openCVSamplefacedet
ection/src/main//jni/Android.mk:detection_based_tracker: non-system libraries in
 linker flags: -lopencv_java
Android NDK:     This is likely to result in incorrect builds. Try using LOCAL_S
TATIC_LIBRARIES
Android NDK:     or LOCAL_SHARED_LIBRARIES instead to list the library dependenc
ies of the
Android NDK:     current module
[armeabi-v7a] Compile++ thumb: detection_based_tracker <= DetectionBasedTracker_
jni.cpp
[armeabi-v7a] SharedLibrary  : libdetection_based_tracker.so
C:/Users/lbais/AppData/Local/Android/ndk/toolchains/arm-linux-androideabi-4.8/pr
ebuilt/windows-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.8/../../../../arm-l
inux-androideabi/bin/ld.exe: warning: hidden symbol '__aeabi_atexit' in C:/Users
/lbais/AppData/Local/Android/ndk/sources/cxx-stl/gnu-libstdc++/4.8/libs/armeabi-
v7a/thumb/libgnustl_static.a(atexit_arm.o) is referenced by DSO C:/Users\lbais\D
ocuments\OpenCV-android-sdk\sdk\native\jni\/../libs/armeabi-v7a/libopencv_java.s
o
[armeabi-v7a] Install        : libdetection_based_tracker.so => libs/armeabi-v7a
/libdetection_based_tracker.so

Error:

05-08 18:03:16.179  21367-21367/org.opencv.samples.facedetect E/AndroidRuntime﹕ FATAL EXCEPTION: main
    Process: org.opencv.samples.facedetect, PID: 21367
    java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/org.opencv.samples.facedetect-2/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]] couldn't find "libdetection_based_tracker.so"
            at java.lang.Runtime.loadLibrary(Runtime.java:366)

Full log:

05-08 18:03:16.123  21367-21367/org.opencv.samples.facedetect D/OpenCVManager/Helper﹕ Trying to init OpenCV libs
05-08 18:03:16.123  21367-21367/org.opencv.samples.facedetect D/OpenCVManager/Helper﹕ Trying to load library /data/app/org.opencv.engine3-1/lib/arm/libopencv_java.so
05-08 18:03:16.169  21367-21367/org.opencv.samples.facedetect D/OpenCVManager/Helper﹕ OpenCV libs init was ok!
05-08 18:03:16.169  21367-21367/org.opencv.samples.facedetect D/OpenCVManager/Helper﹕ First attempt to load libs is OK
05-08 18:03:16.172  21367-21367/org.opencv.samples.facedetect I/OpenCVManager/Helper﹕ [ 05-08 18:03:16.172 21367:21367 I/OpenCVManager/Helper ]
    General configuration for OpenCV 3.0.0-rc1 =====================================
05-08 18:03:16.172  21367-21367/org.opencv.samples.facedetect I/OpenCVManager/Helper﹕ Version control:               3.0.0-rc1
05-08 18:03:16.172  21367-21367/org.opencv.samples.facedetect I/OpenCVManager/Helper﹕ [ 05-08 18:03:16.172 21367:21367 I/OpenCVManager/Helper ]
    Platform:
05-08 18:03:16.172  21367-21367/org.opencv.samples.facedetect I/OpenCVManager/Helper﹕ Host:                        Darwin 13.2.0 i386
05-08 18:03:16.172  21367-21367/org.opencv.samples.facedetect I/OpenCVManager/Helper﹕ Target:                      Linux 1 armv7-a
05-08 18:03:16.172  21367-21367/org.opencv.samples.facedetect I/OpenCVManager/Helper﹕ CMake:                       2.8.12.2
05-08 ...
(more)