ndk version and opencv conflict resolution method
One,
1. Opencv3 and below only support gnustl_shared compilation, but gnustl_shared compilation is not supported after NDK16, so this has reached a crossroads. If you want you to use a version of NDK lower than 16 or use opencv4,
2. The following figure shows my compilation error-match matcher failed to connect
3. The new version of NDK uses libc++ as STL, but OpenCV uses gnustl.
and so:
1. NDK downgrade
Recompile OpenCV and use libc++ as STL
2. Recompile OpenCV and use libc++ as STL
I used NDK downgrade
2. NDK downgrade steps
1. Need to download a version of ndk15, and provide you with a link, which contains various versions. (https://blog.csdn.net/shuzfan/article/details/52690554)
2. After downloading, you need to unzip the file and unzip it to the SDK directory of Android Studio and name it ndk-bundle. My path is: D:\InstallPackage\Package\androidSDK\ndk-bundle
3. Configuration variables
My computer----Properties-----Advanced----Environment variables----System variables----path add the path to install NDK
4.
Enter ndk-build under cmd to test whether the test is successful
It shows: Could not find application project directory! You can leave it alone, because you are not using it on an Android project, it cannot find the Android project.