OpenCV - undefined reference to 'cv::CascadeClassifier::detectMultiScale() after NDK update

后端 未结 5 1282

Yesterday I updated my Android Studio included NDK to version 17.0.4754217and since then I can\'t run my app anymore. When I tried to rerun the code after the u

5条回答
  •  醉梦人生
    2021-01-06 07:21

    OpenCV is built with ANDROID_STL=gnustl_static. After upgrade, your NDK uses the default libc++ instead. You can set ANDROID_STL explicitly in your app/build.gradle:

    android { defaultConfig { externalNativeBuild { cmake {
        arguments '-DANDROID_STL=gnustl_static'
    } } } }
    

    (see an example here).

提交回复
热议问题