Well write more than 300 lines of layout file code, after writing the results, stop running. I was surprised that the XML error should be prompted Ah, I just one of the narrow error of the code range, first directly into a simple textview, run without errors. Slowly add the code until it is added to a radiogroup and stops directly
The original code is like this
1 <Radiogroup2 Android:id= "@+id/rgsex"3 android:orientation= "Horizontal"4 android:layout_gravity= "Center_horizontal">5 6 <RadioButton7 Android:layout_height= "Wrap_content"8 Android:layout_width= "Wrap_content"9 Android:text= "Male"Ten android:checked= "true" One Android:id= "@+id/male"/> A - <RadioButton - Android:layout_height= "Wrap_content" the Android:layout_width= "Wrap_content" - Android:text= "female" - Android:id= "@+id/female"/> - + </Radiogroup>
At that time I do not know where the wrong, I find someone to help, others told me, Radiogroup to set layout_height, layout_width I understand
Change it to this.
1 <Radiogroup2 Android:layout_height= "Wrap_content"3 Android:layout_width= "Wrap_content"4 Android:id= "@+id/rgsex"5 android:orientation= "Horizontal"6 android:layout_gravity= "Center_horizontal">7 8 <RadioButton9 Android:layout_height= "Wrap_content"Ten Android:layout_width= "Wrap_content" One Android:text= "Male" A android:checked= "true" - Android:id= "@+id/male"/> - the <RadioButton - Android:layout_height= "Wrap_content" - Android:layout_width= "Wrap_content" - Android:text= "female" + Android:id= "@+id/female"/> - + </Radiogroup>
Android stops running problem 1_layout layout XML issues