Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Android

Add a Button inside this RelativeLayout. Don’t add any attributes.

Im not sure what Im doing wrong. Help

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".MainActivity" >
<button android:id="@android:id/button1">

3 Answers

I suggest you do this change which as said above make the b in button capital and you also have to end the tag. I am not sure if you have closed the tag further down, but I suggest you change your button line for this

<Button android:id="@android:id/button1" />

you need to capitalize Button. and also the task asks you not to add any attributes so remove the id attribute

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".MainActivity" >
<Button>

Can you emphasize the question? So I can give you the proper answer.

If possible, could you send me a screenshot of your problem?