What if the Android app ". R file" disappears? android. r

Source: Internet
Author: User

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.

 

  1. Select "eclipse -- myeclipse" and the R file will appear.

  2. 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. 3

    Copy an R file from another project, and modify it in string. xml. You can also update the R file.

  4. 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

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.