leadrien / opencv_native_androidstudio

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

libnative-lib.so', missing and no known rule to make it #11

Closed zeshaoaaa closed 6 years ago

zeshaoaaa commented 6 years ago

Error: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

Hello @leadrien , I compile this project failed, do you have any clue?

leadrien commented 6 years ago

Hello, It looks like you have a problem with jniLibs path. Did you make the symlink? What's your OS?

zeshaoaaa commented 6 years ago

Hello @leadrien , I am using Win10. I couldn't reproduce the problem, but there is another problem,

===========================Error info================================= Error:ABIs [mips64, armeabi, mips] are not supported for platform. Supported ABIs are [armeabi-v7a, arm64-v8a, x86, x86_64].

leadrien commented 6 years ago

Thx for reporting this. NDK r17 removed them. ndk revision history

Try with the last revision I just pushed 9cc19ff158b0372a523905a19eaaf0786749a39d

cxjacquel commented 6 years ago

It looks like you have a problem with jniLibs path. Did you make the symlink? What's your OS?

I am new with Android Studio, could you explain how to set path ? Thx

abhigarg commented 5 years ago

The symlink is not working at least not on mac. You will have to copy the sub-folders in your opencv-android-sdk/sdk/native/libs/ to the jniLibs folder inside app/src/main

wu-gu commented 5 years ago

I met this problem too; may be is the relative path problem. And I set the absolute path with some setting then solved it; 1, in build.gradle sourceSets { main { jniLibs.srcDirs = ['D:\AndroidSpace\20160923\HelloCv-master\app\src\main\jniLibs'] } }

2, in CmakeLists.txt set(pathToProject D:/project-files/AndroidStudioProjects/OpenSourceProject/GraphCut/app) set(libs ${pathToProject}/src/main/jniLibs) set_target_properties( libopencv_java3 PROPERTIES IMPORTED_LOCATION ${libs}/${ANDROID_ABI}/libopencv_java3.so) include_directories(${pathToProject}/src/main/cpp/includes)