Android App "R file" disappears _android

Source: Internet
Author: User

In fact, Android itself maintains this public final class R class is mainly with new resource files, this R.java without us to modify, if you do not understand do not modify it, it defines each resource value is unique, does not conflict with the system. This file is automatically updated by the ADT plugin, which is automatically updated when you edit the res file and save it.

R.java typically include attr, drawable, IDs, Raw, Layout, string, and XML, depending on the resources you use for the project. When a R.java file is lost, it needs to be rebuilt, but there may be some problems, such as a resource not being updated automatically.

Solve

  1. The Clean,r file that you select Eclipse-MyEclipse will appear.
  2. Click the right mouse button on the project and choose Build Project, and R.java will reply. This makes it possible to automatically complete the resource that the r file points to in the program.
  3. Copy an R file from another project, and then string.xml to change it, clean it, and update the R file.
  4. If none of the above steps are possible. It may be an error caused by the project itself, such as the naming of files in the Resoure resource, such as Result_main.xml, if written result_main.xml is wrong, the resource file name requires all lowercase.

Through this article hope to help everyone, find R file, thank you for the support of this site!

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.