I'm addind openCV native lib into my (in developpement) project. I'm following this guide. I have troubles at the very last step, while building my project, in the OpenCV-android-sdk folder : CameraGLSurfaceView.java
got error cannot find symbol variable styleable
at R.styleable.CameraBridgeViewBase
.
I have tried to add an attrs.xml
file in my values
folder with this content :
<?xml version="1.0" encoding="utf-8"?>
<resources>
<declare-styleable name = "CameraBridgeViewBase" >
<attr name="show_fps" format="boolean"/>
<attr name="camera_id" format="integer" >
<enum name="any" value="-1" />
<enum name="back" value="2" />
<enum name="front" value="1" />
</attr>
</declare-styleable>
</resources>
As it said in this quite similar error. But nothing changed when I rebuild my project.
In opencv 4 just change
res.srcDirs = ['/build/master_pack-android/opencv/modules/java/android_sdk/android_gradle_lib/res']
to
res.srcDirs = ['res']
in the gradle file
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With