i make android program that use OpenCV , i import OpenCV 2.4.9 module to my project and it worked, but when i run the app make unfortunately error and close i found in android studio that the (AndroidRuntime: FATAL EXCEPTION: main) error made because this ( OpenCVLoader.initAsync(OpenCVLoader.OPENCV_VERSION_2_4_9, this, mLoaderCallback); ) line but i can't solve this error , please help.
Asked
Active
Viewed 483 times
0
-
Welcome to Stackoverflow.com! Please make your question a Minimal, Complete, and Verifiable example [M.C.V E](https://stackoverflow.com/help/mcve). Also check [how to ask question](https://stackoverflow.com/help/how-to-ask) to make your post answerable. – Morse Jun 03 '18 at 03:42
1 Answers
0
Download OpenCv Manager in your Android App. Include code In your Android app
static {
System.loadLibrary("native-lib");
}
static {
if(!OpenCVLoader.initDebug()){
Log.d(TAG, "OpenCV not loaded");
} else {
Log.d(TAG, "OpenCV loaded");
}
}
Including this should remove this error.To get a detailed description, refer to How to integrate OpenCV Manager in Android App

KnightRider
- 161
- 5
-
i download it and write this code to test that OpenCV add correctly and the app worked will and show "OpenCV loaded" , but now when open camera activity it show this error in the line of OpenCVLoader.initAsync(OpenCVLoader.OPENCV_VERSION_2_4_9, this, mLoaderCallback); – Mazen Mohamed May 27 '18 at 13:35