[ERROR]can't convert Drawable

  • 1 Antworten
  • Letztes Antwortdatum
B

Blackscreen

Neues Mitglied
0
Hei Leute habe im Forum nichts passendes gefunden, was mein Problem löst.
Deswegen habe ich diesen Thread erstellt.

In meiner View erstelle ich 8 ImageButtons und es wird eben die Fehlermeldung: Failed to convert @+drawable/stern.png into a drawable
Exception details are logged in Window > Show View > Error Log



Hier der *.xml Code
Code:
<TableLayout 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" >

    <TableRow
        android:id="@+id/tableRow1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginLeft="10dip"
        android:padding="5dip"
        android:visibility="visible" >

        <ImageButton
            android:id="@+id/spiele"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:contentDescription="@string/desc"
            android:src="@+drawable/ball_fertig.png" />

        <ImageButton
            android:id="@+id/shop"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:contentDescription="@string/desc"
            android:src="@+drawable/einkaufstasche_shop.png" />

        <ImageButton
            android:id="@+id/freundesliste"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:contentDescription="@string/desc"
            android:src="@+drawable/freunde.png" />
    </TableRow>
        
          <TableRow
        android:id="@+id/tableRow2"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:padding="5dip"
        
        >
        
        <ImageButton
            android:id="@+id/geschenke"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:contentDescription="@string/desc"
            android:src="@+drawable/geschenke.png"
            />
        <ImageButton
            android:id="@+id/statistiken"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:contentDescription="@string/desc"
            android:src="@+drawable/statistik.png"
            />
        <ImageButton
            android:id="@+id/rangliste"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:contentDescription="@string/desc"
            android:src="@+drawable/stern.png"
            />
        </TableRow>
</TableLayout>
 
Lösche mal das + vor drawable in deinen src-Angaben.

Gesendet von meinem Nexus 4 mit der Android-Hilfe.de App
 
Zurück
Oben Unten