错误:No resource found that matches the given name 'Theme.AppCompat.Light'解决方法

来源:互联网 发布:淘宝刷单负债百万 编辑:程序博客网 时间:2024/03/29 22:57

res中styles.xml里  <style name="AppBaseTheme" parent="Theme.AppCompat.Light">发生错误

信息如下:

Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'.


原因:android中的某些API(包括类方法或者XML属性)更换成android版本时,它们的路径已经发生了改变,从而导致编译器无法找到它们,所以编译无法通过。


解决方法:改成 <style name="AppBaseTheme" parent="android:Theme.Light">(即对应的新的Style)


2 3