Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1060081
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T18:16:19+00:00 2026-05-16T18:16:19+00:00

I wanted to place a working RadioGroup inside a ScrollView. This main.xml caused the

  • 0

I wanted to place a working RadioGroup inside a ScrollView.

This main.xml caused the app to blow up on load… “Sorry! The application… has stopped unexpectedly. Please try again. Force close”

    <ScrollView>
        <RadioGroup android:id="@+id/types">
                    ...

And this worked

    <ScrollView>
        <RadioGroup android:id="@+id/types" android:layout_width="wrap_content" android:layout_height="wrap_content">
            ....

My question, though, is how to figure this out? (aside from trying out random code I find on the Internet). On the force close, the stack trace seems to just be a bunch of launcher stuff, and never mentions my main.xml (using Debug mode in Eclipse with an AVD). Is there an error message somewhere that says that these attributes are missing?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T18:16:20+00:00Added an answer on May 16, 2026 at 6:16 pm

    How to Debug

    You should see an error similar to this

    java.lang.RuntimeException: Binary XML file line #7: You must supply a layout_width attribute.
    

    in the logcat system debug output.

    Requirements

    Width and height are always required. In the Layout Parameters section in the “Declaring Layout” official Dev Guide, it says

    All view groups include a width and height (layout_width and layout_height), and each view is required to define them. Many LayoutParams also include optional margins and borders.

    Also in the “Layout Resource” Dev Guide, it is stated that all subclasses of View require these two attributes

    android:layout_height
    

    Dimension or keyword. Required. The height for the element, as a dimension value (or dimension resource) or a keyword (“fill_parent” or “wrap_content”). See the valid values below.

    android:layout_width
    

    Dimension or keyword. Required. The width for the element, as a dimension value (or dimension resource) or a keyword (“fill_parent” or “wrap_content”). See the valid values below.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is the scenario: I'm working on a new ASP.NET application that uses master
If you have a sequence of block elements and you wanted to place margin
Wanted to get some consensus around a UI feature I'm working on right now.
Working with Rails 3.2.1 and Ruby 1.9.3, where is the proper place to initialize
I got started by following this awesome tutorial , but wanted to do the
I'm following this introduction to Haskell , and this particular place (user defined types
My app was working great and then client asked to put a login screen
I have been working on a jqplot horizontal bar graph. I WANTED TO HAVE
I have this HTML & CSS and the 'overflow: hidden' tag is not working
I am working on a Kid's Book App for iPad. It has a UIView

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.