As of the 2020 to 25 update, you only need to add the following code in your activity's onResume
or onCreate
method before calling any OpenCV-related functions or methods:
OpenCVLoader.initLocal();
// or
OpenCVLoader.initDebug();
And boom, this will resolve the error.