The pits encountered during Android development

Source: Internet
Author: User

In the Android learning process, there will be a lot of pits, I will meet me, the one by one column down, convenient for later people to check!

1:android-support-v4.jar and Android-support-v7-appcompat.jar issues, in the new project is because the Novice select Targart sdk,compile SDK, when selecting the high version of the time, There will be no problem finding these two packages,

Solution: Appcompat_v7 Source As the new project LIB, import

2: Regular R files cannot be generated automatically, resulting in references to resources in the code are, hints cannot be found;

The common reason is that there is an error in Layout.xml, which prevents the R file from being generated automatically. When the R file does not exist, clean, if not yet check the layout file, troubleshoot errors, and then clean;

In this case, do not use CTL +shift + O, which is automatically imported into Android. R System Package, and then the name has been automatically generated by the R file, but you are still prompted not to find the resource.

Workaround: Build clean, Project->clean, because this action in the Android development too common, it is recommended to establish their own handy shortcut keys, such as Ctrl+shift+d; Setup method

Eclipse->windows->preference->general->keys interface in the right section find the build Clean command to add the binding (you want to use what combination key, you set the line)

The pits encountered during Android development

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.