Closed matanel-6over6 closed 5 years ago
HI @matanel-6over6, you haven't set your own path to the opencv 4 library.
Referring to mine cmakelists.txt
, go to the opencv section and edit this set(OPENCV_PATH your-path-to-opencv/opencv-4.0.1-android-sdk)
.
Make sure to have all the paths set, check: PROJECT_PATH
, LIB_DIR
, DLIB_PATH
.
Also make sure to include the source sets in your build.gradle
, like this:
sourceSets {
main {
jniLibs.srcDirs = [
"src/main/cppLibs/dlib/lib",
"src/main/cppLibs/opencv"
]
}
}
Hi, After i'm running the app i get this error. I don't find the opencv2 folder
Build command failed. Error while executing process /Users/matanelliberman/Library/Android/sdk/cmake/3.10.2.4988404/bin/cmake with arguments {--build /Users/matanelliberman/Downloads/android-face-landmarks-master/app/.externalNativeBuild/cmake/debug/arm64-v8a --target native-lib} [1/2] Building CXX object CMakeFiles/native-lib.dir/src/main/cpp/native-lib.cpp.o FAILED: CMakeFiles/native-lib.dir/src/main/cpp/native-lib.cpp.o /Users/matanelliberman/Library/Android/sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++ --target=aarch64-none-linux-android21 --gcc-toolchain=/Users/matanelliberman/Library/Android/sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64 --sysroot=/Users/matanelliberman/Library/Android/sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/sysroot -Dnative_lib_EXPORTS -I../../../../E:/Luca/Librerie/OpenCV/opencv-4.0.1-android-sdk/sdk/native/jni/include -I../../../../src/main/cppLibs/dlib/include -I../../../../include -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -fno-addrsig -Wa,--noexecstack -Wformat -Werror=format-security -stdlib=libc++ -frtti -fexceptions -std=c++11 -frtti -fexceptions -fexceptions -std=c++11 -O0 -fno-limit-debug-info -fPIC -MD -MT CMakeFiles/native-lib.dir/src/main/cpp/native-lib.cpp.o -MF CMakeFiles/native-lib.dir/src/main/cpp/native-lib.cpp.o.d -o CMakeFiles/native-lib.dir/src/main/cpp/native-lib.cpp.o -c ../../../../src/main/cpp/native-lib.cpp ../../../../src/main/cpp/native-lib.cpp:13:10: fatal error: 'opencv2/opencv.hpp' file not found
include <opencv2/opencv.hpp>
1 error generated. ninja: build stopped: subcommand failed.
10x