未加载Android ImageView [英] Android ImageView not loaded
问题描述
我正在使用android imageView,并将图像放入drawable文件夹,并将imageView源更改为该图像.但是它不会在预览"面板中显示图像,并且当我在android studio中打开图片时,它会显示这样的错误.
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?
推荐答案
类似piac.png的声音不是.png文件,您只是在其上拍了一个.png扩展名,并期望它会成为.png文件.通过打开文件(也许是.jpg),然后将其另存为实际的.png文件,可以解决该问题.
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.
这篇关于未加载Android ImageView的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!