将AndroidStudio升级到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

看起来一样
AAPT2 compile failed: invalid dimen on Android 3.0 Canary 1但我找不到使它在Window上运行的方法

任何帮助或建议将不胜感激。

最佳答案

你看到这个https://www.reddit.com/r/androiddev/comments/4u0gw1/support_library_2411_released/

如果您使用的是24.x版的支持库(您甚至是您的依赖项),则该库与AAPT2不兼容,您应该:

gradle.properties文件中的

  • disaale aapt2
    :android.enableAapt2=false
  • 或将Google库升级到版本25
    或26
  • 10-08 04:06