Here's how I fixed this in Eclipse:
Create `R.java` in **gen** folder manually and save. After that go to **Project** and click **"Clean"** The following message will display and your file will automatically be rewritten:
**R.java was modified manually! Reverting to generated version!**
This is alternate approach
R is an automatically generated class that holds the constants used to identify your >resources. If you don't have an `R.java` file (it would be gen/com.techfuze.app_name/R.java in >Eclipse with the 1.5 SDK) I would recommend closing and reopening your project or going to **>Project > Build all** (and selecting **"Build Automatically"** while there as recommended by >Josef). If that doesn't work than try making a new project, if the problem is recreated than >post here again and we'll go into more detail.
but I've found out that there was another problem that was causing the first one. The tools in the SDK directory didn't have the permissions to be executed, so it was like the didn't exist for Eclipse, thus it didn't build the `R.java` file.
So modifying the permission and selecting **"Build Automatically"** solved the problem.
Here's how I fixed this in Eclipse:
Create R.java in gen folder manually and save.
After that go to Project and click "Clean"
The following message will display and your file will automatically be rewritten:
**R.java was modified manually! Reverting to generated version!**
This is alternate approach
R is an automatically generated class that holds the constants used to identify your >resources. If you don't have an R.java file (it would be gen/com.techfuze.app_name/R.java in >Eclipse with the 1.5 SDK) I would recommend closing and reopening your project or going to >Project > Build all (and selecting "Build Automatically" while there as recommended by >Josef). If that doesn't work than try making a new project, if the problem is recreated than >post here again and we'll go into more detail.
but I've found out that there was another problem that was causing the first one. The tools in the SDK directory didn't have the permissions to be executed, so it was like the didn't exist for Eclipse, thus it didn't build the R.java file.
So modifying the permission and selecting "Build Automatically" solved the problem.