I have this problem after upgrade AndroidStudio to 3.0 Canary 1
Error:D:\Project\Freelance\Andoid\sosokan-android\sosokan-android\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:911 invalid drawable
Error:java.lang.RuntimeException: com.android.builder.internal.aapt.AaptException: AAPT2 compile failed:
Error:Execution failed for task ':app:mergeDebugResources'.
> Error: java.lang.RuntimeException: com.android.builder.internal.aapt.AaptException: AAPT2 compile failed:
aapt2 compile -o D:\Project\Freelance\Andoid\sosokan-android\sosokan-android\app\build\intermediates\res\merged\debug D:\Project\Freelance\Andoid\sosokan-android\sosokan-android\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml
Issues:
- ERROR: D:\Project\Freelance\Andoid\sosokan-android\sosokan-android\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:911 invalid drawable
It look same AAPT2 compile failed: invalid dimen on Android 3.0 Canary 1 but I can not find the way to make it work on Window
Any help or suggestion would be great appreciated.
did you see this https://www.reddit.com/r/androiddev/comments/4u0gw1/support_library_2411_released/
If you are using support libraries on version 24.x (you or even your dependencies), this is incompatible with AAPT2 and you should :
android.enableAapt2=false
@Phan Van Linh, can you please check the line from "values.xml:911" where you are getting the invalid drawable issue & google it exactly?
I had the same issue with one of my project and the problematic line was:
<item name="crop_image_menu_crop" type="drawable"/>
It was from an image library I had used in my project. The issue was that I was using an older version of the library. Once I updated to newer version, the error was gone.
Hopefully, your issue might get fixed like mine.
Happy Hunting!
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