Ask Your Question
0

Working with OpenCV 4.0.1 and Android Studio but getting R.Styleable errors

asked 2019-01-19 15:59:14 -0500

Upon going through the process of setting up a test app in Android Studio I find I am baffled by 5 simple R.styleable errors....Unsure where to go with it...So I get the errors in the files: CameraGLSurfaceView and CameraBridgeViewBase

1 of those appears in the attr file in the openCV library

<declare-styleable name="CameraBridgeViewBase" &gt;="" <attr="" name="show_fps" format="boolean"/> <attr name="camera_id" format="integer" &gt;="" <enum="" name="any" value="-1"/> <enum name="back" value="99"/> <enum name="front" value="98"/> </attr> </declare-styleable>

Any thoughts about what I am missing (might be simple for someone who works in android more often than I)

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2019-01-22 06:14:51 -0500

Ankir33 gravatar image

Or follow the instructions in the file OpenCV-android-sdk / sdk / build.gradle or change res.srcDirs = ['/ build / master_pack-android / opencv / modules / java / android_sdk / android_gradle_lib / res'] to res.srcDirs = ['res']

https://github.com/opencv/opencv/issu...

edit flag offensive delete link more

Comments

After change res.srcDirs = ['/ build / master_pack-android / opencv / modules / java / android_sdk / android_gradle_lib / res'] to res.srcDirs = ['res'], I can build successfully, but when run application on device, it has error "OpenCV was not initialised correctly. Application will be shutdown". Can you help me with solution?

tiensu gravatar imagetiensu ( 2019-02-14 20:12:43 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2019-01-19 15:59:14 -0500

Seen: 751 times

Last updated: Jan 19