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">



--
Kostya Vasilev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com

--
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

Reply via email to