Y
Y
Yarik Mamaev2019-03-01 20:35:55
Android
Yarik Mamaev, 2019-03-01 20:35:55

How to fix "error: cannot find symbol variable styleable" after OpenCV import in android studio?

I've been struggling with the riddle for the second week. I did everything as in this guide . After all the steps in the CameraBridgeViewBase file, the error error: cannot find symbol variable styleable. 5c796bc2332f5915988259.png.
PS And here's some more magic. If you change the SDK version in both build.gradle (openCV and applications) to the same "arbitrary" number, then the error at the project build stage disappears, but when you try to run it, it appears again.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Y
Yarik Mamaev, 2019-03-01
@Conqueror3

I found an error. The whole problem was in the manifest, in the line

implementation fileTree(dir: 'libs', include: ['*.jar'])
. After installing and connecting the java module from the OpenCV4android package, two entries were swapped and the string was obtained
implementation fileTree(include: ['*.jar'], dir: 'libs')
, which caused an unexpected and hard-to-find error.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question