问题
I am using the android imageView and I put the the image into the drawable folder, and changed the imageView source to that image. But it does not show the image in the Preview panel and when I open the picture in the android studio,it show the error like this.
But I can open the picture on my computer desktop. so why there is the error and how to solve it?
回答1:
Sounds like piac.png was not a .png file, you just slapped a .png extension on it and expected it to become a .png file. The problem is likely resolved by opening the file (maybe it was a .jpg) and then saving it as an actual .png file.
来源:https://stackoverflow.com/questions/35797223/android-imageview-not-loaded