Infact the text of these tutorials is not updated i think. On Mon, Jul 26, 2010 at 10:11 PM, Sam Hobbs <s...@samhobbs.org> wrote:
> Oh, thank you very much; using 2.2 works. > > The instructions for Notepadv2 (exercise 2) say to create the project the > same as Notepadv1 (exercise 1) and Notepadv1 says "we recommend selecting a > target with the lowest platform version available", so is that misleading? > Should the Notepadv2 instructions explain about the requirement for 2.2 and > the fix you provide here for older versions? > > > > > Kostya Vasilyev wrote: > >> Sam, >> >> According to docs: >> >> >> http://developer.android.com/reference/android/view/ViewGroup.LayoutParams.html >> >> >> match_parent is introduced in API version 8, that is, Android 2.2 >> >> Your project is probably set up to compile against an earlier version of >> Android. If that is the case, use layout_xxx="fill_parent", not >> "match_parent". >> >> -- Kostya >> >> 26.07.2010 19:49, Sam Hobbs пишет: >> >>> I am getting errors from the Notepadv2 sample in the tutorials. If the >>> problem is that I made a mistake, then I will try to figure it out but >>> I really think I followed instructions. The tutorial is at: >>> >>> http://developer.android.com/resources/tutorials/notepad/index.html >>> >>> The Notepadv1 works for me, but Notepadv2 gets the errors below. All I >>> did was to create the project from the Notepadv2 source without >>> modifying anything. The gen folder is empty so I assume I can ignore >>> the errors about R. >>> >>> >>> Description Resource Path Location Type >>> error: Error: String types not allowed (at 'layout_height' with value >>> 'match_parent'). note_edit.xml /Notepadv2/res/layout line 3 Android >>> AAPT Problem >>> error: Error: String types not allowed (at 'layout_height' with value >>> 'match_parent'). note_edit.xml /Notepadv2/res/layout line 3 Android >>> AAPT Problem >>> error: Error: String types not allowed (at 'layout_width' with value >>> 'match_parent'). note_edit.xml /Notepadv2/res/layout line 3 Android >>> AAPT Problem >>> error: Error: String types not allowed (at 'layout_width' with value >>> 'match_parent'). note_edit.xml /Notepadv2/res/layout line 3 Android >>> AAPT Problem >>> error: Error: String types not allowed (at 'layout_width' with value >>> 'match_parent'). note_edit.xml /Notepadv2/res/layout line 7 Android >>> AAPT Problem >>> error: Error: String types not allowed (at 'layout_width' with value >>> 'match_parent'). note_edit.xml /Notepadv2/res/layout line 7 Android >>> AAPT Problem >>> error: Error: String types not allowed (at 'layout_width' with value >>> 'match_parent'). note_edit.xml /Notepadv2/res/layout line 23 Android >>> AAPT Problem >>> R cannot be resolved Notepadv2.java >>> /Notepadv2/src/com/android/demo/notepad2 line 45 Java Problem >>> R cannot be resolved Notepadv2.java >>> /Notepadv2/src/com/android/demo/notepad2 line 60 Java Problem >>> R cannot be resolved Notepadv2.java >>> /Notepadv2/src/com/android/demo/notepad2 line 64 Java Problem >>> R cannot be resolved Notepadv2.java >>> /Notepadv2/src/com/android/demo/notepad2 line 71 Java Problem >>> >>> >>> >>> The following is at line 3 of note_edit.xml. >>> >>> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" >>> android:orientation="vertical" android:layout_width="match_parent" >>> android:layout_height="match_parent"> >>> >>> >> >> > -- > Sam Hobbs > Los Angeles, CA > > -- > You received this message because you are subscribed to the Google > Groups "Android Beginners" group. > > NEW! Try asking and tagging your question on Stack Overflow at > http://stackoverflow.com/questions/tagged/android > > To unsubscribe from this group, send email to > android-beginners+unsubscr...@googlegroups.com<android-beginners%2bunsubscr...@googlegroups.com> > For more options, visit this group at > http://groups.google.com/group/android-beginners?hl=en > -- Ali Murtaza Software Engineer | www.xelleration.com amurt...@xelleration.com| t. +92 42 35781913 | m. +92 331 4450405 -- You received this message because you are subscribed to the Google Groups "Android Beginners" group. NEW! Try asking and tagging your question on Stack Overflow at http://stackoverflow.com/questions/tagged/android To unsubscribe from this group, send email to android-beginners+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en