Today, I saw an Android post on the internet about splash activity, and the blogger gave the code after an explanation. So the decisive download down to see how to achieve. Step by step follow the process to implement this function again. Everything is not a big problem, but during the Gradle compile prompt error:
Libpng error:not a PNG file
It is clear from the tips that the added resources are not in PNG format. But I looked at the files under the Resource folder, all at the end of the PNG format. After a search on the internet on StackOverflow found a post said: Do not just see the file name is *.png end, and to see the actual format is not PNG format. What do you think? There is a way to open the file directly with the hex editor to see if the first few characters are ". png". As follows:
There is also an easy way to open these image files with picture Viewer one by one and then save them in PNG format. This method, whether or not, are saved again is foolproof, of course, the workload relative also handed over.
In the process of using PNG pictures, you may also encounter the following error message:
Iccp:not Recognizing known SRGB profile it has been edited
This error occurs because the packaging tool in the high version of the Android SDK AAPT upgrades the libpng package, which is very strict with the PNG format, so one solution is to reduce the compile SDK Version, Use the lower version of the SDK tool to compile and package. Of course, there are other ways to solve this problem: Use the picture editing software to get rid of the meta-data in the picture:
Android Studio Add PNG image error reason