Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error: failed to read PNG signature: file does not start with PNG signature

Tags:

android

I replaced the default logo files "ic_launcher.png" in the different dpi folders with my own files, also named "ic_launcher.png", but now I'm getting this error:

Error: failed to read PNG signature: file does not start with PNG signature

when generating apk, on all the 5 files I replaced in the mipmap folders

How do I fix that?

like image 826
Abhijeet Avatar asked Dec 29 '17 15:12

Abhijeet


2 Answers

When you create the .apk all the resources are analyzed and if you get the error message:

Error:error: failed to read PNG signature: file does not start with PNG signature.

enter image description here

This error is caused because your resource is not really a .png image, the format is incorrect, the file is corrupt or the .png file is really a vector asset.

enter image description here

you can check it by opening your file.

like image 96
Jorgesys Avatar answered Oct 25 '22 05:10

Jorgesys


Yeah me too got this error but you can fix this by choosing refactor>rename and rename the extension into .jpg instead of .png and refactor it that's all.. and you will be not getting error anymore

like image 35
Harsh Kothari Avatar answered Oct 25 '22 06:10

Harsh Kothari