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'.

 

 解决方法:

 

在Eclipse中打开任意一个.java文件,输入  android.R.style.   这时你会看到一个提示列表,仔细看看,再对比一下,看哪个与原有的最接近就选择哪个。用将下划线替换成"."就可了。

<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">

相关文章:

  • 2021-04-29
  • 2021-11-08
  • 2021-10-04
  • 2021-08-25
  • 2022-12-23
  • 2022-12-23
  • 2021-10-03
  • 2021-03-30
猜你喜欢
  • 2021-11-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-04
  • 2022-12-23
  • 2022-01-26
相关资源
相似解决方案