Eclipse Android错误找不到与给定名称匹配的资源

时间:2015-11-26 18:32:21

标签: android eclipse

在日食中我应该怎么处理这个问题呢?(对不起我写英文不是很神)

[2015-11-26 21:35:07 - First] D:\AndroidWorks\appcompat_v7\res\values-v21\styles_base.xml:106: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ProgressBar.Horizontal'.
[2015-11-26 21:35:07 - First] 
[2015-11-26 21:35:07 - First] D:\AndroidWorks\appcompat_v7\res\values-v21\styles_base.xml:110: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ProgressBar'.
[2015-11-26 21:35:07 - First] 
[2015-11-26 21:35:07 - First] D:\AndroidWorks\appcompat_v7\res\values-v21\styles_base.xml:38: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ListPopupWindow'.
[2015-11-26 21:35:07 - First] 
[2015-11-26 21:35:07 - First] D:\AndroidWorks\appcompat_v7\res\values-v21\styles_base.xml:50: error: Error: No resource found that matches the given name: attr 'android:overlapAnchor'.
[2015-11-26 21:35:07 - First] 
[2015-11-26 21:35:07 - First] D:\AndroidWorks\appcompat_v7\res\values-v21\styles_base.xml:55: error: Error: No resource found that matches the given name: attr 'android:overlapAnchor'.
[2015-11-26 21:35:07 - First] 
[2015-11-26 21:35:07 - First] D:\AndroidWorks\appcompat_v7\res\values-v21\styles_base.xml:41: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.PopupMenu'.

并且声明这个例子。 (我的项目名称是“第一个”)

感谢。

2 个答案:

答案 0 :(得分:0)

在项目属性中设置如下所示的api-level 21.

enter image description here

for Android studio在build.gradle

中设置如下
android {
  compileSdkVersion 21
  // ...

  defaultConfig {
    // ...
    targetSdkVersion 21
  }
}

答案 1 :(得分:0)

在eclipse中打开你的project.properties文件(appcompat lib)并将目标编辑为android-21或以上警告你不应该手动使用属性来改变它。

 select ratingId, productivity, codeQuality, agileProcess
      , round(cast(productivity as double) + 
              cast(codeQuality as double) + 
              cast(agileProcess as double) / 3,2)
 from developerRating