First case
-
Locate the project item on the Eclipse toolbar
-
Click before Build automatically to make it in the √ state.
-
Or just click on Build all (shortcut keyboard is ctrl+8)
The second case
Many people encounter the problem of cannot be resolved to a variable when they create a new project, they can't get the best solution in the first time.
The root cause is that the R.java file is not automatically generated
About the general solution on the Internet a lot of people have come up with this
such as clean engineering, clean up resource,android Tools >> Fix project Properties, etc.
But still some people see the online post still can't solve, then please note two points:
1. If you are updating the SDK, then shut down and restart Eclipse to
2. If not, update the full ADT, SDK
Eclpise Create an Android project and cannot automatically generate R files