天天看點

AAPT err(Facade for 928882516): libpng error: Not a PNG file 問題解決AAPT err(Facade for 928882516): libpng error: Not a PNG file 問題解決

AAPT err(Facade for 928882516): libpng error: Not a PNG file 問題解決

Android Studio 3.0 aapt檢查

這個錯誤的原因 就是項目中有的圖檔是非PNG格式,有可能修改檔案的時候直接将字尾名改為.PNG

下面是來自StackOverflow上的解決方案:

Try run command

in your root project directory, it will show you all files that have .png extension, but are not pngs. Then you can resave them as png in some image editor. Before running this command clean project, to speed up the process.

經本人親自實驗,檢測出非PNG格式的圖檔:markdown_placeholder.png,其格式為JPEG

AAPT err(Facade for 928882516): libpng error: Not a PNG file 問題解決AAPT err(Facade for 928882516): libpng error: Not a PNG file 問題解決

然後,你就可以找美工修改成對應的PNG格式的圖檔