Search code examples
androidr.java-file

R.java's values not recognized


I downloaded a an android project folder from a friend (the app works). In eclipse, I created a new Android project from existing code. However, there are errors at the lines calling the layouts/ids from R.java. Example: R.layout.my_layout

I tried cleaning the project, and deleting the project and creating it again. The code should be working. I checked R.java to make the sure the name matches. Note that I am an advanced-beginner at Android, so I know the basics. Please help, thanks.


Solution

    1. if you downloaded the project from a friend, you shouldn't be creating a completely new project, but choose "new project from existing source".

    2. try looking in the project properties under Android, many times, the import screws up the properties and moves the target SDK to the lowest possible and you'll need to change that"