Android development, layout XML file naming considerations-cannot contain any uppercase letters

Source: Internet
Author: User

Transferred from: http://blog.sina.com.cn/s/blog_628b45090100zuit.html

In the development of Android applications, will be exposed to the layout files, generally in the project name/res/layout/*.xml directory, which is similar to the Web page development using CSS control layout, the main purpose is to separate the layout and program code, easy to modify the layout and control.

If you use Eclipse platform development, each Android project will have a R.java file that identifies all the resources, and when the resource file (typically the *.xml file located under the Res directory) is modified, the R.java file is updated automatically. But there is a special case. If the layout file contains any uppercase letters, the R.java file update will fail.       The problem is so annoying that it's hard to find out where it's wrong. For example, to add a Test.xml file under the/res/layout/directory, the R.java file is not updated, the Test.xml file is not available in the code, and then the layout file of any name is added to the/res/layout/directory. The same will happen (regardless of whether there is a capital letter in the name). In order to solve this problem, only the Test.xml file can be deleted, that is, all the layout files under the res/layout/directory, the file name can not appear in uppercase letters, or there will be an error.

Android development, layout XML file naming considerations-cannot contain any uppercase letters

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.