After I added some .png files into my Project Workspace drawable folder I refreshed my drawable folders in Eclipse and the newly added files showed up. But when I tried to a
Check your file in drawable folder ensure that all are resource file (image) remove unwanted file Like thumb.db. Remove those all files and check again
I had the dreaded missing R problem yesterday with Eclipse Juno after a routine clean. StackExchange is full of suggestions and extensive googling revealed only the usual suspects (XML naming conventions problems, etc) none of which seemed to apply directly, although it is certainly possible I missed something.
The best summary comprehensive list of possible causes and fixes was here:
http://www.techrepublic.com/blog/software-engineer/a-comprehensive-troubleshooting-guide-for-androids-r-cannot-be-resolved-error/
One useful tip there was to try to create and run a simple "Hello World" in my workspace. If that does not run, the setup is corrupted. My Hello World was just as full of errors as my custom app.
The solution that worked for me (perhaps great overkill but nothing else worked) was to completely uninstall Android SDK and delete Eclipse (Juno), download Eclipse for Developers (Kepler) and reinstall Android ADT plugin and ADK and recreated my AVDs using the latest "compile with" version in options.
So far so good, although I am recreating the app from scratch. I will be more cautious about using clean from here on.
This may be simple but check to make sure you don't use
import android.R;
Proven successful method, check the file (AndroidManifest.xml) and delete all comments in it, and make sure there are no errors in this file, I tried and did work with me.
This exact same thing happened to me. coincidentally I needed to update my adk that day, so i did so and after restarting eclipse it worked again. My recommendation would be to build the project and restart eclipse. It is not due to any error in your code.
i removed 'import android.R;' then commented out the offending lines, then did a build, ok
then i removed the comment and it fixed it