Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

failed parsing overlays - Aapt2 - Android Studio

I'm trying to use dlib in Android Studio for my university's project. I did import all the .so files that I needed, but I can't import the shape_predictor_68_face_landmarks.dat... (I want to import it as a raw file)

I get AAPT2 error: check logs for details and the Java compiler says failed parsing overlays. Do you know what can I do to fix this ? I've never seen a topic about failed parsing overlays.

I already tried to put android.enableAapt2=false in the gradle.properties and the testOptions in the gradle.build without success...

You can find the build log here : Build log

And the project here : https://github.com/ghysc/Stage

If you need any more information, please let me know.

Thanks for reading.

Cyril G

like image 704
Cyril Avatar asked Jan 29 '23 06:01

Cyril


1 Answers

Using your GitHub project I found out it was a problem with one of the resource files you had - it was too big for AAPT2 to process:

./app/src/main/res/raw/shape_predictor_68_face_landmarks.dat

This was a bug in AAPT2 but it has been fixed recently.
So if you update your android gradle plugin version in your build.gradle file to 3.2.0-alpha11 or newer it all compiles fine:

classpath 'com.android.tools.build:gradle:3.2.0-alpha11'
like image 69
Izabela Orlowska Avatar answered Jan 31 '23 20:01

Izabela Orlowska