Я обновил Android Studio для использования ndk18 и изменил:
APP_STL := c++_static
Это привело к куче ошибок компоновщика в OpenCv:
../thirdparty/opencv-android-sdk/sdk/native/jni/../libs/arm64-v8a/libopencv_objdetect.a(detection_based_tracker.cpp.o): In function `cv::DetectionBasedTracker::updateTrackedObjects(std::vector<cv::Rect_<int>, std::allocator<cv::Rect_<int> > > const&)':
detection_based_tracker.cpp:(.text._ZN2cv21DetectionBasedTracker20updateTrackedObjectsERKSt6vectorINS_5Rect_IiEESaIS3_EE+0xad8): undefined reference to `std::__throw_length_error(char const*)'
../thirdparty/opencv-android-sdk/sdk/native/jni/../libs/arm64-v8a/libopencv_objdetect.a(detection_based_tracker.cpp.o): In function `_GLOBAL__sub_I_detection_based_tracker.cpp':
detection_based_tracker.cpp:(.text.startup._GLOBAL__sub_I_detection_based_tracker.cpp+0x18): undefined reference to `std::ios_base::Init::Init()'
detection_based_tracker.cpp:(.text.startup._GLOBAL__sub_I_detection_based_tracker.cpp+0x1c): undefined reference to `std::ios_base::Init::~Init()'
detection_based_tracker.cpp:(.text.startup._GLOBAL__sub_I_detection_based_tracker.cpp+0x34): undefined reference to `std::ios_base::Init::~Init()'
Как это исправить?
Я использую OpenCv Android SDK 3.1.