flutter 构建应用程序时出现应用程序启动器图标问题

wecizke3  于 2022-11-25  发布在  Flutter
关注(0)|答案(1)|浏览(167)
> A failure occurred while executing com.android.build.gradle.internal.res.Aapt2CompileRunnable
      > Android resource compilation failed
        ERROR:AAPT: C:\Users\Prejith T S\Documents\projects\ATTENDANCE\TASKT7\wtiattendance\android\app\src\main\res\mipmap-mdpi\ic_launcher.png: error: failed to read PNG signature: file does not start with PNG signature.
        C:\Users\Prejith T S\Documents\projects\ATTENDANCE\TASKT7\wtiattendance\android\app\src\main\res\mipmap-mdpi\ic_launcher.png: error: file failed to compile.

我想建立一个apk为我的客户端,但现在是不可能的

k97glaaz

k97glaaz1#

这可能是一个JPG重命名为PNG文件,而不是一个实际的PNG文件。问题可能是因为错误的图像扩展名。
该文件是JPE图像,但保存为PNG,未转换为。在这种情况下,请将扩展名更改为实际扩展名并转换为PNG,然后重试。
例如,你有ic_launcher.png,但它实际上是一个JPG图像,你应该把它重命名回ic_launcher.jpg,然后使用Photoshop之类的工具,或者在线转换工具把图像转换成PNG格式。

相关问题