Android:r cannot is resolved to a varia ...
2012-07-27 10:58:32 uploaded by: Wangdao Download (0) view (57568) Comment (0) Recommendation (0)
Tags: Android: ...
Resource Description:
Android development process, encountered R cannot is resolved to a variable error message, as if there is no very certain wrong reason, generally speaking, I summed up a few possible solutions, I hope to try to work later ...
1. Check if the Android SDK is missing and need to download again, check the build path
2. Ensure class does not have import ANDROID.R;
3, error class refers to the layout of the XML file without errors
4. Check the Androidmanifest.xml file, inside the package,layout configuration file, Strings.xml and other strings are all written correctly
The string in the Strings.xml referenced in the 5.layout XML file is spelled exactly correctly
6. In the layout of the XML file to add a control handwriting to see if the ID can be automatically generated in R.java, if not, it is very likely that the layout of the XML file is a problem, to see whether the format is used correctly, or contain any illegal string, or call to an incorrect string, And so on, you can use the exclusion method to remove the control, until you find that the error message disappears or the ID can be automatically generated in R.java.
7. Delete the Gen folder, make the R.java auto-generated once, if not, continue to check the layout of the XML file is not easy to find the problem
8.Clean project, re-build, or re-import project.
9. Restart Eclipse
10. Restart your computer to prevent problems with your Android virtual machine