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

J Donahue
30,790 Pointsandroid:background="@android:color/black"
android:background="@android:color/black"
I've added the above line of code into my activity_main.xml as suggested but eclipse keeps giving me the following error:
Attribute name "android:background" associated with an element type "RelativeLayout" must be followed by the ' = ' character.
I placed it after the layout_height but before the closing > as instructed but the error persists
3 Answers

J Donahue
30,790 PointsI actually ended up resolving this issue by simply cutting all of the code from main_activity.xml - saving it as a blank file and then re-pasting it back into the file. This removed the error. Eclipse was just being a little buggy. We made up and now we're friends again.

Iskandar Fendi
5,700 PointsHi Jeremy,
Instead of doing this, I suggest you may put the ID for RelativeLayout in XML file.
To change the background: You initiate RelativeLayout variable in MainActivity.java. and you can do setBackgroundColor(int) function to change the background of it.
Please let me know if this is what you are looking for

J Donahue
30,790 PointsI believe I tried what you have suggested. However, I can't see if it works because Eclipse won't let me run it due to errors. The error that it's talking about is the one I mentioned above. Now, what's driving me crazy is that I've removed the line of code that supposedly is causing this error but the error won't go away. What's even stranger is that the error keeps telling me that the line of code that I removed is the problem. I've closed Eclipse and restarted it, but it's still there. Now the question I'm dealing with is - why does this error persist despite the absence of the code causing it?