leadrien/opencv_native_androidstudio

Messages Gradle Build Error

nouhahammami opened this issue · 7 comments

i got this gradle error after importing this project,

Gradle tasks [:app:assembleDebug]
error: '../../../../src/main/jniLibs/arm64-v8a/libopencv_java3.so', needed by '../../../../build/intermediates/cmake/debug/obj/arm64-v8a/libnative-lib.so', missing and no known rule to make it
BUILD FAILED
..

what doesn't mean ?

I guess you have not made the symlink named jniLibs in app/src/main that points to YOUR_OPENCV_SDK/sdk/native/libs as mentioned in the readme

i'm working with windows, and i made the symlink as mentioned in the readme

C:/OpenCV-android-sdk/sdk/native/libs

i'm using opencv 3 sdk, i changed also CMakeLists.txt file

include_directories(C:/OpenCV-android-sdk/sdk/native/jni/include)

what's the problem so ?

I have not much experience in Windows but I think the problem comes from the symlink.
Try just coping /sdk/native/libs folder into app/src/main instead. And rename it to jniLibs.

Your CMakeList.txt looks correct to me

i'll try it, thanks for replying

after adding the .so files to jniLibs, and running the project i got this error in gradle

Error:(58, 34) error: unknown class name 'Feature2D'; did you mean 'ogl::Texture2D'?

i'm using the opencv3.0.0 sdk

image

@nouhahammami
change build.gradle in openCVLibrary300
compileSdkVersion xx , xx need >= 21

image