AAPT2 compile failed: invalid dimen on Android 3.0 Canary 1 on Windows

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

  • Getting reference to nested fragment from FragmentTabHost
  • How to tell if an X and Y coordinate are inside my button?
  • Unable to install Android USB driver on Windows 7 Pro 64 bit
  • How can I update information in an Android Activity from a background Service
  • com.google.firebase.database.DatabaseException: Calls to setPersistenceEnabled() must be made before any other usage of FirebaseDatabase instance
  • Highlight selected item in “ListFragment”?
  • Any help or suggestion would be great appreciated.

    Related posts:

    Embed Zxing library without using Barcode Scanner app
    How to get RGB value from hexadecimal color code in java
    Eclipse android emulator freezes
    Data Binding Android - Type parameter T has incompatible upper bounds : ViewDataBinding and MainActi...
    Cordova 4.3.0 Error: Please install Android target: “android-21”
    How does android handle differences between preview size/ratio and actual SufaceView size?
  • How to apply video filtering in android?
  • Java.lang.verifyerror how do I fix or even find out the root cause?
  • Reasons that the passed Intent would be NULL in onStartCommand
  • Java library using css selectors to parse XML
  • How to do something when a checkbox change state?
  • How to create an ImageView that fills the parent height and displays an Image as big as possible?
  • 2 Solutions collect form web for “AAPT2 compile failed: invalid dimen on Android 3.0 Canary 1 on Windows”

    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 :

    • disbale aapt2 in your gradle.properties file
      :android.enableAapt2=false
    • or upgrade google libraries to version 25
      or 26

    @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!

    Android Babe is a Google Android Fan, All about Android Phones, Android Wear, Android Dev and Android Games Apps and so on.