package not found - issue building

asked 2015-05-08 14:42:13 -0500

zehemz gravatar image

updated 2015-05-09 01:58:49 -0500

berak gravatar image

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

LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
include C:\Users\lbais\Documents\OpenCV-android-sdk\sdk\native\jni\
LOCAL_SRC_FILES  := DetectionBasedTracker_jni.cpp
LOCAL_LDLIBS     += -llog -ldl
LOCAL_MODULE     := detection_based_tracker

Compile output:

Android NDK: WARNING:C:/Users/lbais/Documents/face-detection/openCVSamplefacedet
ection/src/main//jni/ non-system libraries in
 linker flags: -lopencv_java
Android NDK:     This is likely to result in incorrect builds. Try using LOCAL_S
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_
[armeabi-v7a] SharedLibrary  :
inux-androideabi/bin/ld.exe: warning: hidden symbol '__aeabi_atexit' in C:/Users
v7a/thumb/libgnustl_static.a(atexit_arm.o) is referenced by DSO C:/Users\lbais\D
[armeabi-v7a] Install        : => libs/armeabi-v7a


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 ""
            at java.lang.Runtime.loadLibrary(

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/
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 ]
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:             
05-08 ...
edit retag flag offensive close merge delete



It seems that you are using precompiled example from the 3.0-rc1 release. There is an issue about it: - it does not contain all precompiled libraries, only mips.

The issue is being fixed and updated android pack will be uploaded to the Sourceforge in a day or two.

mshabunin gravatar imagemshabunin ( 2015-05-12 09:33:02 -0500 )edit

Did you fix this, when I download the latest from the bug report, it does not contain in the lib directory

burf2000 gravatar imageburf2000 ( 2015-06-08 10:28:47 -0500 )edit

It is located in example package: open "samples/example-face-detection.apk" -> find "lib/<arch>/"

mshabunin gravatar imagemshabunin ( 2015-06-09 10:57:22 -0500 )edit

The face example just seems impossible to get working, did you get the latest 3.0RC

burf2000 gravatar imageburf2000 ( 2015-06-09 15:23:42 -0500 )edit

Make sure you've installed OpenCV manager from SDK, not from Google Play. I tested face example on two devices and it works well.

mshabunin gravatar imagemshabunin ( 2015-06-11 03:48:26 -0500 )edit