Android无法找到图片

时间:2016-01-27 12:54:18

标签: android find drawable

我在这里遇到了这个问题......似乎ringer.png不存在..并查看文件夹名称..没有“可绘制”字样 问题出在哪里?

Android

3 个答案:

答案 0 :(得分:3)

因为drawable中的图片不可用,mipmap中的图片不可用。试试这个。

android:src="@mipmap/ringer_on"

答案 1 :(得分:1)

复制所有这些图像并将它们放入Drawable中,因为mipmap仅适用于我们的应用程序图标。

有关详细信息,请参阅http://android-developers.blogspot.co.uk/2014/10/getting-your-apps-ready-for-nexus-6-and.html链接

答案 2 :(得分:1)

 <ImageView
    android:id="@+id/imageView1"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:layout_marginTop="32dp"
    android:src="@mipmap/ic_login_logo" />

尝试使用mipmap而不是drawable。