Android Project R,java file cannot be updated automatically, after clean, R.java disappears

Source: Internet
Author: User

Today, an Android project, a new jump page, add the background map, found that there is a r.id can not find, so clean a bit, this problem, found everywhere the r.id can not find, error. It turns out R.java's gone.
Then various Baidu results:
There are said to be re-clean, there is said that Android Tools--fix project Propertities, but none of the work. Then continue to Baidu, see a common point of view is that as long as the XML file has a problem, the system will never automatically generate R.java for you.

See this error to realize, my background image name has a problem, the name can only be the number of letters and underscores, my picture is the middle crossbar, I changed the name of the picture, sure enough, R.java file automatically appeared, and automatically updated, the problem is resolved satisfactorily.

To summarize this type of problem resolution steps:

1.project-->clean;

Fix Project Propertities 2.Android Tools

3. Continue to Clean view background prompt error, generally because of problems in the XML file (such as: ID duplicate ah, or the name of the ID can not find, etc.), there is the file name is not correct, the file name only number + letter + underscore.

Android Project R,java file cannot be updated automatically, after clean, R.java disappears

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.