I am new to opencv in android. I imported the opencv module 3.4.2 successfully. In application.mk
APP_STL:=gnustl_static
When I tried to build the application, I got NDK build error that 'gnustl_static' is no longer supported. I changed the above line in application.mk to
APP_STL:=c++_static
as suggested by android studio.
The build was successful and I ran the project successfully. Now I tried to implement the face detection with opencv as like as opencv samples 'face-detection'. I got the error this time :
E:/MyOpenDetections/app/src/main/jni/com_sar_pahc_DetectionBasedTracker.cpp:37: error: undefined reference to 'cv::CascadeClassifier::detectMultiScale(cv::_InputArray const&, std::__ndk1::vector<cv::Rect_<int>, std::__ndk1::allocator<cv::Rect_<int> > >&, double, int, int, cv::Size_<int>, cv::Size_<int>)'
I searched about this and got some suggestions that I have to change the APP_STL to 'gnustl_static' from 'c++_static' but when I do this the NDK stops the build and shows that it is not supported now.
I got some hint from Alex Cohn that I have to rebuild the Opencv with c++_static OpenCV - undefined reference to 'cv::CascadeClassifier::detectMultiScale() after NDK update
But I have no idea of doing that. Please help