What if the Android app ". R file" disappears? android. r
In fact, Android maintains this public final class R class mainly with the new resource file, this R. java does not need to be modified by ourselves. If you do not know it, do not modify it. Every resource value it defines is unique and will not conflict with the system. This file is automatically updated by the ADT plug-in. When you edit the Res file and save it, this class will be automatically updated.
R. java generally contains attr, drawable, id, raw, layout, string, and xml, depending on the resources used by your project. When the R. java file is lost, you need to re-create it, but there may be some problems, such as the resource cannot be automatically updated.
Select "eclipse -- myeclipse" and the R file will appear.
- 2
Right-click the Project and select "Build Project". R. java will reply. In this way, the resources directed to by the R file can be called in the program automatically.
- 3
Copy an R file from another project, and modify it in string. xml. You can also update the R file.
- 4
If none of the above steps works. It may be an error caused by the project itself, such as the file name in the resoure resource, such as result_main.xml. If the file is written as Result_main.xml, the resource file name must be in lowercase.
Turn: http://jingyan.baidu.com/article/fc07f98917046f12ffe51929.html