-1

I just created a new android application project in Eclipse Juno and upon loading the new project, there were already six errors in my error logs all of it saying, "R cannot be resolved to a variable".

How do I fix this? Please help. Thanks.

Enzo
  • 21
  • 3

2 Answers2

1

For this

-Remove imported R from import section after that

-Check the all xml file for error

-Now clean the project

-Still getting problem then delete the R.java file from gen directory

-Now clean it

Hope this will be helpful..thanks

A Sahu
  • 45
  • 7
sahu
  • 1,188
  • 10
  • 19
0

Actually this can be solved if you CLEAN your project. If cleaning the project won't work try these ways:

take a look at this sample: 1. http://www.mybringback.com/android-sdk/1/hello-world/

or you can reference on this questions:

R cannot be resolved - Android error

R cannot be resolved to a variable

http://www.anddev.org/sdk-adt-emulator-problems-f16/r-cannot-be-resolved-to-a-variable-t52607.html

Hope it helps :D

Community
  • 1
  • 1