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 '