导入项目到Android Studio的时候,Gradle Build失败了,报的错是


FAILURE: Build failed with an exception.

Execution failed for task ':app:mergeDebugResources'.
> Some file crunching failed, see logs for details

AAPT: libpng error: Not a PNG file

AAPT err(Facade for 197782496) : No Delegate set : lost message:libpng error: Not a PNG file

说文件不是PNG文件,可是没有说是哪一张图。

解决方法

在build.gradle里加入

android {

    ......

aaptOptions {         cruncherEnabled = false     }

 

}

 

可以正常运行了!

相关文章:

  • 2021-10-01
  • 2021-11-19
  • 2021-07-13
  • 2022-12-23
  • 2021-09-04
  • 2022-12-23
  • 2021-04-29
  • 2022-12-23
猜你喜欢
  • 2021-10-23
  • 2022-12-23
  • 2021-07-04
  • 2021-10-23
  • 2022-12-23
  • 2021-07-01
  • 2021-07-06
相关资源
相似解决方案