2

I was recently trying to learn Android development and I came into 2 problems. They are

Failed to convert @drawable/backround.png into a drawable
Couldn't resolve resource @drawable/backround.png

Heres My XML File

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:background="@drawable/backround.png"
    android:layout_height="fill_parent"
    android:orientation="vertical" >  
</LinearLayout>
Melquiades
  • 8,496
  • 1
  • 31
  • 46
user3268323
  • 21
  • 1
  • 1
  • 2

4 Answers4

7

Restart Eclipse (unfortunately) and the problem will go away.

(Android Studio: File --> Invalidate caches/Restart... )

This question: Android: failed to convert @drawable/picture into a drawable

Saeid
  • 2,261
  • 4
  • 27
  • 59
5
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
 android:layout_width="fill_parent"
 android:background="@drawable/backround"
 android:layout_height="fill_parent"
 android:orientation="vertical" >  </LinearLayout>

There is no need of extensions here. just mention the name without extension

Tamilselvan Kalimuthu
  • 1,534
  • 1
  • 13
  • 28
0

replace background.png with background

    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:background="@drawable/backround"
    android:layout_height="fill_parent"
    android:orientation="vertical" >
</LinearLayout>
SuRu
  • 739
  • 1
  • 6
  • 19
0

Change

android:background="@drawable/backround.png"

with android:background="@drawable/backround" and make sure that background image is present in your drawable folder

jyomin
  • 1,957
  • 2
  • 11
  • 27