Android Studio 出包时,抛出Aapt2Exception异常解决方案总结

(1)第一种情况:APPT2 编译问题:

解决方案:在gradle.properties中关闭APPT2 编译,增加:


1
android.enableAapt2=false
(2)在 Gradle console 中报   AAPT err(Facade for 1031089232): libpng error: Not a PNG file

  解决方案:

build.gradle中加入下面两个句话就可以忽略图片的检测了,ADT好像默认忽略这些检查。

[plain]  view plain  copy
  1. aaptOptions.cruncherEnabled = false  
  2. aaptOptions.useNewCruncher = false  

猜你喜欢

转载自blog.csdn.net/sunny2come/article/details/80366543