leadrien / opencv_native_androidstudio

An android studio project with native Opencv
320 stars 120 forks source link

Messages Gradle Build Error #5

Closed nouhahammami closed 7 years ago

nouhahammami commented 7 years ago

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 ?

leadrien commented 7 years ago

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

nouhahammami commented 7 years ago

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 ?

leadrien commented 7 years ago

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.

leadrien commented 7 years ago

Your CMakeList.txt looks correct to me

nouhahammami commented 7 years ago

i'll try it, thanks for replying

nouhahammami commented 7 years ago

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

kyshel commented 7 years ago

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

image