【发布时间】:2015-02-06 22:12:48
【问题描述】:
我有一个充满错误的大控制台,都是一样的错误。
[2015-02-07 08:33:42 - TheHunter] C:\Users\Windows 8\workspace\TheHunter\res\drawable-hdpi\custom2.xml:4: error: Error: No resource found that matches the given name (at 'drawable' with value '@drawable/button2').
[2015-02-07 08:33:42 - TheHunter] C:\Users\Windows 8\workspace\TheHunter\res\drawable-hdpi\custom3.xml:4: error: Error: No resource found that matches the given name (at 'drawable' with value '@drawable/button3').
我有同样的错误,但在我的控制台中出现了大约 100 次不同的图像。 这只是我主页的一小部分代码,我有几个按钮和图像正在使用,但总是出现所有相同的错误。由于这些错误,我看到它不允许我在 android 模拟器中使用该应用程序的所有图像。
您能告诉我为什么会出现这些错误吗?谢谢。
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/background"
tools:context="com.application.thehunter.MainActivity" >
<ImageButton
android:id="@+id/imageButton1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_marginTop="74dp"
android:contentDescription="TODO"
android:background="@drawable/custom1"
android:src="@drawable/Button1"
tools:ignore="HardcodedText,ContentDescription" />
<ImageButton
android:id="@+id/imageButton2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_below="@+id/imageButton1"
android:contentDescription="TODO"
android:background="@drawable/custom2"
android:src="@drawable/Button2"
tools:ignore="HardcodedText,ContentDescription" />
【问题讨论】: