It seems like Android Studio can’t detect the R module of OpenCV. I am new using OpenCV and I don’t know if I’m forgetting to perform some important step in the installation.
I would be very grateful if you help me solve the problem!
Task :opencv:compileDebugJavaWithJavac FAILED
/Users/kevin/AndroidStudioProjects/tesisOpenCv/opencv/java/src/org/opencv/android/AsyncServiceHelper.java:7: error: package org.opencv.engine does not exist
import org.opencv.engine.OpenCVEngineInterface;
^
/Users/kevin/AndroidStudioProjects/tesisOpenCv/opencv/java/src/org/opencv/android/AsyncServiceHelper.java:47: error: cannot find symbol
protected OpenCVEngineInterface mEngineService;
^
symbol: class OpenCVEngineInterface
location: class AsyncServiceHelper
/Users/kevin/AndroidStudioProjects/tesisOpenCv/opencv/java/src/org/opencv/android/CameraGLSurfaceView.java:3: error: cannot find symbol
import org.opencv.R;
^
symbol: class R
location: package org.opencv
/Users/kevin/AndroidStudioProjects/tesisOpenCv/opencv/java/src/org/opencv/android/CameraBridgeViewBase.java:5: error: cannot find symbol
import org.opencv.BuildConfig;
^
symbol: class BuildConfig
location: package org.opencv
/Users/kevin/AndroidStudioProjects/tesisOpenCv/opencv/java/src/org/opencv/android/CameraBridgeViewBase.java:6: error: cannot find symbol
import org.opencv.R;
^
symbol: class R
location: package org.opencv
/Users/kevin/AndroidStudioProjects/tesisOpenCv/opencv/java/src/org/opencv/android/JavaCameraView.java:15: error: cannot find symbol
import org.opencv.BuildConfig;
^
symbol: class BuildConfig
location: package org.opencv
/Users/kevin/AndroidStudioProjects/tesisOpenCv/opencv/java/src/org/opencv/android/AsyncServiceHelper.java:161: error: package OpenCVEngineInterface does not exist
mEngineService = OpenCVEngineInterface.Stub.asInterface(service);
^
/Users/kevin/AndroidStudioProjects/tesisOpenCv/opencv/java/src/org/opencv/android/CameraGLSurfaceView.java:48: error: package R does not exist
TypedArray styledAttrs = getContext().obtainStyledAttributes(attrs, R.styleable.CameraBridgeViewBase);
^
/Users/kevin/AndroidStudioProjects/tesisOpenCv/opencv/java/src/org/opencv/android/CameraGLSurfaceView.java:49: error: package R does not exist
int cameraIndex = styledAttrs.getInt(R.styleable.CameraBridgeViewBase_camera_id, -1);
^
/Users/kevin/AndroidStudioProjects/tesisOpenCv/opencv/java/src/org/opencv/android/CameraBridgeViewBase.java:74: error: package R does not exist
TypedArray styledAttrs = getContext().obtainStyledAttributes(attrs, R.styleable.CameraBridgeViewBase);
^
/Users/kevin/AndroidStudioProjects/tesisOpenCv/opencv/java/src/org/opencv/android/CameraBridgeViewBase.java:75: error: package R does not exist
if (styledAttrs.getBoolean(R.styleable.CameraBridgeViewBase_show_fps, false))
^
/Users/kevin/AndroidStudioProjects/tesisOpenCv/opencv/java/src/org/opencv/android/CameraBridgeViewBase.java:78: error: package R does not exist
mCameraIndex = styledAttrs.getInt(R.styleable.CameraBridgeViewBase_camera_id, -1);
^
/Users/kevin/AndroidStudioProjects/tesisOpenCv/opencv/java/src/org/opencv/android/CameraBridgeViewBase.java:429: error: cannot find symbol
if (BuildConfig.DEBUG)
^
symbol: variable BuildConfig
location: class CameraBridgeViewBase
/Users/kevin/AndroidStudioProjects/tesisOpenCv/opencv/java/src/org/opencv/android/JavaCameraView.java:302: error: cannot find symbol
if (BuildConfig.DEBUG)
^
symbol: variable BuildConfig
location: class JavaCameraView
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
14 errors