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

  • How to handle back button in activity
  • Color overlay in android NDK
  • textureview onSurfaceTextureAvailable never called inside relativelayout inside fragment
  • Android Notification restarts app but want to resume
  • How to create custom palette with custom color for Material Design App?
  • How to obtain Signing certificate fingerprint (SHA1) for OAuth 2.0 on Android?
  • Any help or suggestion would be great appreciated.

  • Screen flashes randomly when using overridePendingTransition on Jelly Bean
  • How to remove FloatingActionButton's surrounding shadow?
  • What is the difference between setDisplayHomeAsUpEnabled and setHomeButtonEnabled?
  • How to find Intent source in Android?
  • Perform both the normal click and long click at button
  • Load Contact Image Into Bitmap
  • 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.