I do not understand why use Eclipse write Android program R file error but always find the reason, the answer a lot of online, but no one can solve some problems, is ADT and Eclipse Bug, it isa waste of time, why to do XML file to edit, with XML file editing does not matter, But the format requirements are strictly abnormal, there are errors and not error problems, there are many times when writing things are not prompt, the IDE tool really to improve, so little in the XML layout programming to improve a little bit! @google @sun @world So the problem of the father has not a better solution, later see said to clean several times, build several times, restart the software a few times is the method of the pit dad, suggest directly to the R file to kill, as long as you can see the interface effect on the line, do not go to tube it, And then re-build a project, all the files are tested, and then to save and update, do not clean, accidentally put R file, too they pit dad
Setcontentview (R.layout.activity.main);
"
R.layout.activity.main "This is always an error, there is no way to find a good solution on the Internet."
(activity cannot be resolved or was not a field)
When you see this prompt,
Do not always go clean, this I never use, it will directly lead to your R file is erased, and if your profile inside straight error, then you can not find the error, the R file will never be automatically generated, this will seriously waste the programmer's time, the following my personal experience, can be used as a reference, Or there's a question to ask here.
Sometimes it may be your computer configuration problem, or the development tool itself automatically generated address efficiency issues, so the error will occur, if you write the program is not a problem, you can completely ignore, do not be a small stone stalls live the train ahead.
However, there are a few small solutions to improve efficiency, such as your SDK path can be set as short as possible.
There are write programs, especially when the import program, it is best to copy into the empty space, which will improve the IDE generated address compilation efficiency, really not, you can run on the real machine, in many cases, the real machine can run on the simulator but unable to start, Because the tools themselves are affected by the operating environment and running memory of the computer system.
This article is from the "Win7 Update Failed" blog, reproduced please contact the author!
Eclipse efficiency and error issues with automatic generation of Android R files