Ich habe einige Probleme mit einer RadioGroup. Aus irgendeinem Grund kann es die ID eines meiner RadioButtons nicht finden.Keine Ressource gefunden, die den angegebenen Namen mit RadioGroup
Der Fehler:
Error:(18, 32) No resource found that matches the given name (at 'checkedButton' with value '@id/euro1').
Mein Code:
<RadioGroup
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/betGroup"
android:checkedButton="@id/euro1">
<RadioButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/euro1"
android:drawableLeft="@drawable/euromoent1"
android:layout_marginBottom="10dp"/>
<RadioButton
android:drawableLeft="@drawable/euromoent2"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:id="@+id/euro2"
android:layout_marginBottom="10dp"/>
<RadioButton
android:drawableLeft="@drawable/euro5small"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:id="@+id/euro5"
android:layout_marginBottom="10dp"/>
<RadioButton
android:drawableLeft="@drawable/euro10small"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:id="@+id/euro10"
android:layout_marginBottom="10dp"/>
<RadioButton
android:drawableLeft="@drawable/euro20small"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:id="@+id/euro20" />
</RadioGroup>
So ist die Linie, die mir eine errror schenkt ist:
android:checkedButton="@id/euro1">
Auch wenn die RadioButton- knapp unterhalb hat, dass genaue ID Was mache ich falsch? Vielen Dank.
hilft Vielen Dank. Ich habe das Problem gelöst, indem ich ein Plus in der ID hinzugefügt habe: Android: checkedButton = "@ + id/euro1". Ich denke, deine hätte auch funktioniert! – Jesper