文件不以 PNG 签名开头

问题描述 投票:0回答:2

,我尝试在 google play 上上传我的 flutter 应用程序,当我编写此命令时

flutter build appbundle
我收到了告诉我的错误

我尝试在我的项目中编写此命令来构建 grudle.aa 文件:

flutter build appbandel
但是我得到了这些错误:

Build failed with an exception.

* What went wrong:
Execution failed for task ':app:mergeReleaseResources'.
> Multiple task action failures occurred:
   > A failure occurred while executing com.android.build.gradle.internal.res.Aapt2CompileRunnable
      > Android resource compilation failed
        ERROR: AAPT: com.weenbalaqee.weenbalaqee.app-main-19:/mipmap-mdpi/ic_launcher.png: error: failed to read PNG signature: file does not start with PNG signature.
        C:\myfolder\Myproject\android\app\src\main\res\mipmap-mdpi\ic_launcher.png: error: file failed to compile.

   > A failure occurred while executing com.android.build.gradle.internal.res.Aapt2CompileRunnable
      > Android resource compilation failed
        ERROR: AAPT: com.weenbalaqee.weenbalaqee.app-main-19:/mipmap-hdpi/ic_launcher.png: error: failed to read PNG signature: file does not start with PNG signature.
       C:\myfolder\Myproject\android\app\src\main\res\mipmap-hdpi\ic_launcher.png: error: file failed to compile.




   > A failure occurred while executing com.android.build.gradle.internal.res.Aapt2CompileRunnable
      > Android resource compilation failed
        ERROR: AAPT: com.weenbalaqee.weenbalaqee.app-main-19:/mipmap-xxhdpi/ic_launcher.png: error: failed to read PNG signature: file does not start with PNG signature.
       C:\myfolder\Myproject\android\app\src\main\res\mipmap-xxhdpi\ic_launcher.png: error: file failed to compile.



   > A failure occurred while executing com.android.build.gradle.internal.res.Aapt2CompileRunnable
      > Android resource compilation failed
        ERROR: AAPT: com.weenbalaqee.weenbalaqee.app-main-19:/mipmap-xxhdpi/ic_launcher.png: error: failed to read PNG signature: file does not start with PNG signature.
      C:\myfolder\Myproject\android\app\src\main\res\mipmap-xxhdpi\ic_launcher.png: error: file failed to compile.

  > A failure occurred while executing com.android.build.gradle.internal.res.Aapt2CompileRunnable
      > Android resource compilation failed
        ERROR: AAPT: com.weenbalaqee.weenbalaqee.app-main-19:/mipmap-xxxhdpi/ic_launcher.png: error: failed to read PNG signature: file does not start with PNG signature.
       C:\myfolder\Myproject\main projects\WeenBlaqe\android\app\src\main\res\mipmap-xxxhdpi\ic_launcher.png: error: file failed to compile.
android flutter gradle google-play-console
2个回答
0
投票

您的文件名似乎是 ic_launcher.png 但它被手动重命名或以任何形式它不是正宗的 png 文件。

检查this网站,您可以使用它将所有 ic_launcher 文件转换为 png。


0
投票

这是我第二次收到此错误。我只是生成新的启动器图标并将其替换为导致错误的旧图标。使用 https://www.appicon.co/.

生成启动器图标
© www.soinside.com 2019 - 2024. All rights reserved.