Project Introduction Android-support-v7-appcompat encountered problems, no resource found that matches the given name ' Android:Theme.AppCompat.Light '

Source: Internet
Author: User

First, the question

Today is ready to use the toolbar in the V7 package, but in the Styles.xml introduced Theme.AppCompat.Light, the error "No resource found that matches the given name ' Android:Theme.AppCompat.Light ' ".

Second, the settlement

1, the first search for the corresponding error, there are many answers need to import Android-support-v7-appcompat package, introduced several times, or no effect. Finally Kung Fu, accidentally saw a blog mentioned, need to put the project and Android-support-v7-appcompat under the same drive letter, copy the corresponding android-support-v7-appcompat to the same drive letter, Can actually be introduced into the project.

Thanks to this blog blogger: Theme.AppCompat.Light can't find a problem

2, but there is still a problem, import into eclipse in front of the Android-support-v7-appcompat has a red exclamation mark. In my project, I can not find R.java this auto-generated file. The discovery was successfully introduced into my project, but Android-support-v7-appcompat was wrong. Strange, how could this be? Keep looking for reasons.

3, the online version of the compiler has a problem, you need to select more than 21 version of the compilation: Right-click the android-support-v7-appcompat->properties-> you imported to select the left column android-> in Project Bulid Target selects the->clean above api21.

4, hehe, finally the exclamation mark disappeared, appeared the red and Red fork. I have a fork, how there is a compilation error. However, you can see the path of the Red Fork, in the XML file in the res/values/v23, there is not found in the resource. Look at the SDK manager, my Android Supprot library is 23.1.1, but only download the 21 version of the SDK, I just selected the Android-support-v7-appcompat is also 21 version. Look at the corresponding style name, do not use, dry crisp delete the corresponding XML file, Android-support-v7-appcompat compiled successfully.

5, clean my project, compile successfully, R.java appeared.

6, hahaha, write a blog, celebrate a bit. Hope to be useful to everyone.

Project Introduction Android-support-v7-appcompat encountered problems, no resource found that matches the given name ' Android:Theme.AppCompat.Light '

Related Article

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.