Android开发中error: Error retrieving parent for item: No resource found that matches the given name解决方法

来源:互联网 发布:华为怎么下载软件 编辑:程序博客网 时间:2024/06/14 04:18

styles.xml中<style name="AppBaseTheme" parent="Theme.AppCompat.Light">

提示如下错误,这是版本问题。

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


解决方法:


<style name="AppBaseTheme" parent="Theme.AppCompat.Light">

改为

<style name="AppBaseTheme" parent="android:Theme.Light">
 同理,将
<style name="AppBaseTheme" parent="Theme.AppCompat.Light.DarkActionBar">
改为
<style name="AppBaseTheme" parent="android:Theme.Holo.Light.DarkActionBar">


参考:http://www.360doc.com/content/15/0316/15/9200790_455576135.shtml
0 0