Solutions for R.java files lost or not updated in Android development _android

Source: Internet
Author: User

This paper analyzes the solution of R.java file loss or inability to update in Android development. Share to everyone for your reference, specific as follows:

First make sure your SDK is new.

Next, check your. xml file, and the filename cannot be capitalized.

If there are too many XML files, clean your project and watch the console prompts.

Console will prompt you where the XML file error is

After you finish modifying the XML file

Clean your project and build your project

R.java will appear again or later

Android automatically generates a R.java file in development, which is automatically generated and is best not to be changed. But sometimes this Java file will play Hide-and-seek with us, in the program r.xx.xxx will appear frequently error phenomenon.

1 to the project click the right mouse button to choose Build Project,r.java file and back. So r.xx.xxx can come out of X.

If not, try the second method.

2 Select Eclipse/myeclipse Clean so r file will also appear
If it's not, try the third kind.

3 through the above two methods are not the use of the trick from other projects to copy a copy of the R file and then string.xml in a random change can update the R file
If not, try the fourth kind.

4 through the top 3 methods do not indicate that our project has a problem check it
For example Resoure resources in the file naming, example Result_main.xml, if written result_main.xml is wrong to need all lowercase

More interested readers of Android-related content can view this site: "Introduction to Android Development and advanced Course", "Android Service Component Usage Summary", "Android Basic component Usage Summary" and "Android Control usage Summary"

I hope this article will help you with the Android program.

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.