0

I have a big console full of errors, all the same errors.

[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').

I have those same errors but for different images about 100 times in my console. This is just a little bit of my code for my main page, I have several buttons and images being used but keep having all the same errors. I see all the images it just wont allow me to use the app in the android emulator due to these errors.

Could you please tell me why am I getting these errors? Thanks.

<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" />

1 Answer 1

1

THe capital is part of the problem. Resource names must be lowercase, numeric, or underscore beginning with a letter. Also double check that you actually do have files named that.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.