Reputation: 11816
error: No resource found that matches the given name (at 'background' with value '@drawable/mydroidbg.png').
here's the location of my image: C:\Users\Rogeross\Documents\ECLIPSE\MyFirstApp\res\drawable-hdpi\mydroidbg.png
here's the main.xml code:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:background="@drawable/mydroidbg.png" //error here
>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="TOTO ANDROID"
android:gravity="center"
/>
<Button
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="PRESS ME!!"
android:textSize="19dp"
android:textStyle="bold"
/>
</LinearLayout>
i already cleaned, refreshed my project but it still cannot see my image file... please help....
Upvotes: 0
Views: 2150
Reputation: 7472
Do not mention the file extension. Use:
android:background="@drawable/mydroidbg"
Upvotes: 7