Android stops running problem 1_layout layout XML issues

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.