java - Android "Cannot resolve symbol '@id/myLabel" -
i getting error saying "cannot resolve symbol '@id/mylabel
'". same error following elements:
"cannot resolve symbol '@id/numberstudents'" "cannot resolve symbol '@id/accept'"
please me resolve issue. sample of xml being pasted below.
thanks, 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>
it's because declaring id @+id/accept
, using place @id/accept
.
Comments
Post a Comment