okay... I know this is a repeat but, nothing is wrong with my xml. r isn't imported and I have tried cleaning my project.
It started when I added a .png in my drawble folder and I removed it and the error still protists. I don't know what else to try but it is really frustrating.
I have also tried to create new project and the error generators on those too.
Update* I did all of these things and none worked on my first project, but when I created a new one it worked? and before it didn't so something fixed it! I will just transfer my code to that one.
Thank you everyone
Try to delete the R file, it will be automatically recreated & this may resolve the issue. You can find the R file here:
Your Project >> gen >> your package Name >> R.java
Double check your java source file to see if there are any that have "import com.company.R;" statement explicitly defined. If yes, delete them then do a clean on your project. "import com.company.R;" should be never explicitly defined in java source.
In some situation, Eclipse attempt to do some auto fix for us by silently adding "import com.company.R;" to your java source, this does not cause any problem on the existing imported project as the gen folder and R java file has already been generated at this point. However, if you delete gen folder with R.java then trying to fresh import the project into Eclipse again, the malformed java source (those with "import com.company.R") will make the ADT confused when trying to generate/resolve R.java from scratch. As the outcome, you got bunch of compilation error warning "R cannot be resolved".
Hope this solve your problem.
I'm not sure if this can help, but some build problems in eclipse can be solved by deleting errors. Just go to problems view of eclipse, select error and press delete on your keyboard. Then clean project again and build it.