-4
「Cannot resolve symbol '@id/myLabel
'」というエラーが表示されます。 同じエラーは、次の要素のためです:Android「シンボル '@ id/myLabelを解決できません」
"Cannot resolve symbol '@id/numberStudents'"
"Cannot resolve symbol '@id/accept'"
は、この問題を解決するために私を助けてください。 私のXMLのサンプルが下に貼り付けられています。
ありがとう、 Abhilash Kadala。
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<TextView
android:id="@+id/myLabel"
android:text="Name of student:"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
/>
<EditText
android:id="@+id/numberStudents"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_below="@id/myLabel"
/>
<Button
android:id="@+id/accept"
android:text="Accept"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/numberStudents"
android:layout_alignParentRight="true"
android:layout_marginLeft="10px"
/>
<Button
android:id="@+id/cancel"
android:text="Cancel"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toLeftOf="@id/accept"
android:layout_alignTop="@id/accept"
/>
</RelativeLayout>
プロジェクトをクリーンアップしてください。 –
クリーンまたはリビルドが行います。 –
'android:layout_below =" @ id/myLabel "をアンドロイド:layout_below =" @ + id/myLabel "に変更し、他のすべてと同じようにします。 –