Today, I saw an Android post about splash activity on the Internet. The blogger also gave the code after an explanation. So I decisively downloaded it to see how to achieve it. This function is implemented step by step according to the process. There are no major problems, but an error is prompted during gradle compilation:
libpng error: Not a PNG file
From the prompt, it is very concise and clear. The added resources do not belong to PNG format. But I looked at the files in the resource folder. They all end in PNG format. After searching the Internet, I found a post on stackoverflow saying: don’t just look at the end of the file name *. PNG, but look at whether the actual format is PNG format. What do you think?There is a way to open the file directly with a hexadecimal editor to see if the first few characters are “. PNG”. As follows:
In addition, there is a simple way to open these picture files one by one with the picture viewer, and then save them as PNG format files. This method, whether it is or not, is safe to save it again. Of course, the workload is also relatively handed over
In the process of using PNG pictures, you may also encounter the following error prompts:
iccp:Not recognizing known sRGB profile that has been edited
The reason for this error is that the packaging tool AAPT in the higher version Android SDK has upgraded the libpng package. The toolkit has very strict requirements on the PNG format. Therefore, one solution is to reduce the compile SDK version and use the lower version SDK tool for compilation and packaging. Of course, there are other ways to solve this problem: use the image editing software to remove the metadata in the image:
ImageMagick
ImageOptim
Similar Posts:
- How to Solve Libpng warning ICCP error
- Android AAPT2 error: check logs for details [How to Solve]
- [How to Solve] libpng warning: iCCP: known incorrect sRGB profile
- [Solved] Error in uploading app icon when IOS app is released (image can’t contain alpha channels or transparencies)
- python: _tkinter.TclError: couldn’t recognize data in image file
- Solutions to the channel problem of PIL PNG format
- Postman reported an error unsupported media type [How to Solve]
- Ubuntu darknet Error: Cannot load image“/home/…/1380.jpg” STB Reason: can’t fopen
- [Solved] Jar Convert to Dex Error: bad class file magic (cafebabe) or version