0
RadioGroupに問題があります。何らかの理由で、自分のRadioButtonのIDを見つけることができません。RadioGroupで指定された名前と一致するリソースが見つかりません
エラー:
Error:(18, 32) No resource found that matches the given name (at 'checkedButton' with value '@id/euro1').
マイコード:
<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>
だから、私にerrrorを与えている行がある:
android:checkedButton="@id/euro1">
のRadioButtonがちょうど下のことを持っているにもかかわらず、正確なID。私は間違って何をしていますか?ありがとう。
を役に立てば幸いありがとう。私は問題を解決するために、idにプラスを追加することで解決しました。アンドロイド:checkedButton = "@ + id/euro1"。私はあなたも同様に働いていたと思います! – Jesper