eclipse - Cannot be resolved or is not a field (Notepad exercises from android dev website) -


i'm running through notepad exercises on android dev website, working on exercise (found here).

i came end of tutorial , found had several errors in main 2 java files regarding r file relations, such setcontentview(r.layout.notes_list); , menu.add(0, insert_id,0, r.string.menu_insert);

i've tried cleaning , re-genning r.java no avail.

these occur in solution exercise think deliberate mistakes, or eclipse, can't seem fix them, great thanks!

do have layout notes_list.xml in layout folder? have string name of menu_insert in strings.xml? might issue, because think don't give in tutorial... have them in solution :

<linearlayout android:layout_width="wrap_content" android:layout_height="wrap_content"> <listview android:id="@+id/android:list" android:layout_width="wrap_content" android:layout_height="wrap_content"/> <textview android:id="@+id/android:empty" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/no_notes"/> </linearlayout> 

in strings.xml in values folder :

<string name="menu_insert">add note</string> 

Comments

Popular posts from this blog

c++ - How do I get a multi line tooltip in MFC -

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -