Opencv Android: java.lang.UnsatisfiedLinkError: dlopen failed: could not load library "libopencv_java.so" -
updates @ bottom of post
i trying use opencv face recognizers on android , while able wrap c++ code couldn't make work on intel atom avd. i'm not 100% sure think cause of error in title miss libopencv_java.so in /lib/x86 project directory.
any thoughts why lib missing , how work properly?
my android.mk looks like:
local_path := $(call my-dir) include $(clear_vars) opencv_lib_type:=shared include /home/fat/scaricati/opencv-2.4.9-android-sdk/sdk/native/jni/opencv.mk local_module := facedetectionperformances local_src_files := facedetectionperformances.cpp file_list_cpp := $(wildcard $(local_path)/*.cpp) # finds cpp files opencv_install_modules:=on include $(build_shared_library)
while application.mk is
app_stl := gnustl_static app_cppflags := -frtti -fexceptions app_abi := x86 armeabi armeabi-v7a app_platform := android-8
the ndk-build log is
18:32:16 **** auto build of configuration default project facedetectionperformances **** /home/fat/android-ndk-r9d/ndk-build ndk_debug=1 android ndk: warning:jni/android.mk:facedetectionperformances: non-system libraries in linker flags: -lopencv_java android ndk: result in incorrect builds. try using local_static_libraries android ndk: or local_shared_libraries instead list library dependencies of android ndk: current module [x86] gdbserver : [x86-4.6] libs/x86/gdbserver [x86] gdbsetup : libs/x86/gdb.setup [armeabi] gdbserver : [arm-linux-androideabi-4.6] libs/armeabi/gdbserver [armeabi] gdbsetup : libs/armeabi/gdb.setup [armeabi-v7a] gdbserver : [arm-linux-androideabi-4.6] libs/armeabi-v7a/gdbserver [armeabi-v7a] gdbsetup : libs/armeabi-v7a/gdb.setup [x86] compile++ : facedetectionperformances <= facedetectionperformances.cpp [x86] sharedlibrary : libfacedetectionperformances.so [x86] install : libfacedetectionperformances.so => libs/x86/libfacedetectionperformances.so [armeabi] compile++ thumb: facedetectionperformances <= facedetectionperformances.cpp [armeabi] sharedlibrary : libfacedetectionperformances.so [armeabi] install : libfacedetectionperformances.so => libs/armeabi/libfacedetectionperformances.so [armeabi] install : libopencv_java.so => libs/armeabi/libopencv_java.so [armeabi-v7a] compile++ thumb: facedetectionperformances <= facedetectionperformances.cpp [armeabi-v7a] sharedlibrary : libfacedetectionperformances.so /home/fat/android-ndk-r9d/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: warning: hidden symbol '__aeabi_atexit' in /home/fat/android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi-v7a/libgnustl_static.a(atexit_arm.o) referenced dso ./obj/local/armeabi-v7a/libopencv_java.so [armeabi-v7a] install : libfacedetectionperformances.so => libs/armeabi-v7a/libfacedetectionperformances.so [armeabi-v7a] install : libopencv_java.so => libs/armeabi-v7a/libopencv_java.so 1
8:32:37 build finished (took 20s.952ms)
update 1 opencvandroidsdk package provides shared library libopencv_java x86 arch, ndk not move libs/x86 directory @ build time, while armeabi arch. tried move manually /opencv-2.4.9-android-sdk/sdk/native/libs/x86/libopencv_java.so /libs/x86 project subdirectory, when build project, ndk deletes file.
after research, managed solve problem. apparently app_platform android-8 not compatible x86 android-opencv libs. targeted android-9 , worked.
Comments
Post a Comment