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

Eclipse error that just won't go away! Second pair of eyes needed...

I recorded a video showing the error that I'm receiving - follow the link to see it:

https://www.youtube.com/watch?v=-E04AQ-HNoc&feature=youtu.be

Essentially whether I have the line of code

android:background="@android:color/black"

or not - it still gives me the same error in reference to that line

This error is holding everything up...I can't run the program because of it and I can't seem to figure out how to get rid of it.

Harry James
Harry James
14,780 Points

The video you posted seems to be private. I am unable to see what your problem is.

4 Answers

However, I just tried cutting all of the code in the file and saving it as a blank file - then re-pasting the code back in and re-saving it. That just got rid of the error...Ha! Thank you for trying to help me though, I appreciate it.

Harry James
Harry James
14,780 Points

Ah. Clever idea :)

Glad to hear you got it sorted then!

Thanks for letting me know. I just changed it to public.

Harry James
Harry James
14,780 Points

Ok, I took a look at your video and it seems like it's just Eclipse being a bit buggy. From what I can see, there's nothing wrong with your code.

Try cleaning your project, it will reset all errors (You may need to Organise your imports again afterwards with Ctrl+Shift+O on Windows or Cmd+Shift+O on a Mac). To do this, click Project on the top bar and then click the Clean button. Select the project(s) you wish to clean and wait until it is complete. Then, let me know if you still have this issue.

I was so hoping that was going to work. I used the clean option several times and that error is still there.

Harry James
Harry James
14,780 Points

Have you saved after cleaning as well?

I have, yes. Although after cleaning it doesn't really give me an option to save, I had just pressed Ctrl + S.

Harry James
Harry James
14,780 Points

In that case, I am stumped as to what the problem is. Sorry to say but, I am unable to help you with this problem as, I have not encountered it not fixing after a Clean. It's almost definite that it's not an issue with your program as, the error should disappear and it seems more so that it's Eclipse's fault.

So, I give you my apologies for being unable to help and wish you the best of luck on fixing it!