A股上市公司传智教育(股票代码 003032)旗下技术交流社区北京昌平校区

 找回密码
 加入黑马

QQ登录

只需一步,快速开始

imxuimxu

初级黑马

  • 黑马币:25

  • 帖子:11

  • 精华:0

我的ADT的版本是最高的23.0,创建新的android项目,会出现appcompat_v7的内容。
最小ADT我选的API10,最高的选的API20。

出现的appcompat_v7这个是为了兼容版本的问题,不过我的appcompat_v7会出现很多错误,错误如下:
[2014-10-22 23:50:52 - test] D:\BaiduYunDownload\workspace\appcompat_v7\res\values-v21\styles_base.xml:75: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ActionButton'.
[2014-10-22 23:50:52 - test]
[2014-10-22 23:50:52 - test] D:\BaiduYunDownload\workspace\appcompat_v7\res\values-v21\styles_base.xml:79: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ActionButton.CloseMode'.
[2014-10-22 23:50:52 - test]
[2014-10-22 23:50:52 - test] D:\BaiduYunDownload\workspace\appcompat_v7\res\values-v21\styles_base.xml:83: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ActionButton.Overflow'.
[2014-10-22 23:50:52 - test]
[2014-10-22 23:50:52 - test] D:\BaiduYunDownload\workspace\appcompat_v7\res\values-v21\styles_base.xml:25: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ActionBar.TabView'.
[2014-10-22 23:50:52 - test]
[2014-10-22 23:50:52 - test] D:\BaiduYunDownload\workspace\appcompat_v7\res\values-v21\styles_base.xml:29: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Light.ActionBar.TabView'.
[2014-10-22 23:50:52 - test]
[2014-10-22 23:50:52 - test] D:\BaiduYunDownload\workspace\appcompat_v7\res\values-v21\styles_base.xml:33: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ActionBar.TabText'.
[2014-10-22 23:50:52 - test]
[2014-10-22 23:50:52 - test] D:\BaiduYunDownload\workspace\appcompat_v7\res\values-v21\styles_base.xml:37: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Light.ActionBar.TabText'.
[2014-10-22 23:50:52 - test]
[2014-10-22 23:50:52 - test] D:\BaiduYunDownload\workspace\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.Light.ActionBar.TabText'.
[2014-10-22 23:50:52 - test]
[2014-10-22 23:50:52 - test] D:\BaiduYunDownload\workspace\appcompat_v7\res\values-v21\styles_base.xml:65: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.ActionMode.Title'.
[2014-10-22 23:50:52 - test]
[2014-10-22 23:50:52 - test] D:\BaiduYunDownload\workspace\appcompat_v7\res\values-v21\styles_base.xml:69: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.ActionMode.Subtitle'.
[2014-10-22 23:50:52 - test]
[2014-10-22 23:50:52 - test] D:\BaiduYunDownload\workspace\appcompat_v7\res\values-v21\styles_base.xml:45: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.ActionBar.Menu'.
[2014-10-22 23:50:52 - test]
[2014-10-22 23:50:52 - test] D:\BaiduYunDownload\workspace\appcompat_v7\res\values-v21\styles_base.xml:49: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.ActionBar.Title'.
[2014-10-22 23:50:52 - test]
[2014-10-22 23:50:52 - test] D:\BaiduYunDownload\workspace\appcompat_v7\res\values-v21\styles_base.xml:53: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.ActionBar.Subtitle'.
[2014-10-22 23:50:52 - test]
[2014-10-22 23:50:52 - test] D:\BaiduYunDownload\workspace\appcompat_v7\res\values-v21\styles_base.xml:57: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.ActionBar.Title.Inverse'.
[2014-10-22 23:50:52 - test]
[2014-10-22 23:50:52 - test] D:\BaiduYunDownload\workspace\appcompat_v7\res\values-v21\styles_base.xml:61: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.ActionBar.Subtitle.Inverse'.
[2014-10-22 23:50:52 - test]
[2014-10-22 23:50:52 - test] D:\BaiduYunDownload\workspace\appcompat_v7\res\values-v21\styles_base.xml:178: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ProgressBar.Horizontal'.
[2014-10-22 23:50:52 - test]
[2014-10-22 23:50:52 - test] D:\BaiduYunDownload\workspace\appcompat_v7\res\values-v21\styles_base.xml:182: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ProgressBar'.
[2014-10-22 23:50:52 - test]
[2014-10-22 23:50:52 - test] D:\BaiduYunDownload\workspace\appcompat_v7\res\values-v21\styles_base.xml:113: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Spinner'.
[2014-10-22 23:50:52 - test]
[2014-10-22 23:50:52 - test] D:\BaiduYunDownload\workspace\appcompat_v7\res\values-v21\styles_base.xml:115: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Spinner'.
[2014-10-22 23:50:52 - test]
[2014-10-22 23:50:52 - test] D:\BaiduYunDownload\workspace\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.DropDownItem.Spinner'.
[2014-10-22 23:50:52 - test]
[2014-10-22 23:50:52 - test] D:\BaiduYunDownload\workspace\appcompat_v7\res\values-v21\styles_base.xml:107: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ListView.DropDown'.
[2014-10-22 23:50:52 - test]
[2014-10-22 23:50:52 - test] D:\BaiduYunDownload\workspace\appcompat_v7\res\values-v21\styles_base.xml:121: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ListView'.
[2014-10-22 23:50:52 - test]

5 个回复

倒序浏览
[2014-10-22 23:50:55 - appcompat_v7] D:\BaiduYunDownload\workspace\appcompat_v7\res\values-v21\styles_base.xml:75: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ActionButton'.
[2014-10-22 23:50:55 - appcompat_v7]
[2014-10-22 23:50:55 - appcompat_v7] D:\BaiduYunDownload\workspace\appcompat_v7\res\values-v21\styles_base.xml:79: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ActionButton.CloseMode'.
[2014-10-22 23:50:55 - appcompat_v7]
[2014-10-22 23:50:55 - appcompat_v7] D:\BaiduYunDownload\workspace\appcompat_v7\res\values-v21\styles_base.xml:83: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ActionButton.Overflow'.
[2014-10-22 23:50:55 - appcompat_v7]
[2014-10-22 23:50:55 - appcompat_v7] D:\BaiduYunDownload\workspace\appcompat_v7\res\values-v21\styles_base.xml:25: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ActionBar.TabView'.
[2014-10-22 23:50:55 - appcompat_v7]
[2014-10-22 23:50:55 - appcompat_v7] D:\BaiduYunDownload\workspace\appcompat_v7\res\values-v21\styles_base.xml:29: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Light.ActionBar.TabView'.
[2014-10-22 23:50:55 - appcompat_v7]
[2014-10-22 23:50:55 - appcompat_v7] D:\BaiduYunDownload\workspace\appcompat_v7\res\values-v21\styles_base.xml:33: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.ActionBar.TabText'.
[2014-10-22 23:50:55 - appcompat_v7]
[2014-10-22 23:50:55 - appcompat_v7] D:\BaiduYunDownload\workspace\appcompat_v7\res\values-v21\styles_base.xml:37: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Light.ActionBar.TabText'.
[2014-10-22 23:50:55 - appcompat_v7]
[2014-10-22 23:50:55 - appcompat_v7] D:\BaiduYunDownload\workspace\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.Light.ActionBar.TabText'.
[2014-10-22 23:50:55 - appcompat_v7]
[2014-10-22 23:50:55 - appcompat_v7] D:\BaiduYunDownload\workspace\appcompat_v7\res\values-v21\styles_base.xml:65: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.ActionMode.Title'.
[2014-10-22 23:50:55 - appcompat_v7]


像这样的错误还有很多,由于限制发的字数我就不在多发了
回复 使用道具 举报
我上网也找了一些方法,像这样的方法:
解决项目建成后appcompat_v7包出错。test包出现红色警告的问题。
点击菜单栏"Project",选择"Clean",然后点击"OK",Clean完成后,你会发现appcompat_v7包出错。test包出现红色警告的问题已经解决了,只是test包还有黄色警告,那只是因为test的Java文件中import的类没有被使用,所以完全不用管它。
如果还不管用,那么右键appcompat_v7包,选择Properties,点"Android",如果Library栏下的"Is Library"方框没勾选,则勾选上,点击"OK",然后再照以上步骤执行"Clean"操作即可。

但是我这样做之后还是没有任何改变,还是出现以上的错误,我对上面出现的代码实在不是很了解,希望各位高手能帮我分析一下,有什么解决的方案。
回复 使用道具 举报
我现在知道的唯一能解决问题的办法是:在新建项目的时候把minimum required sdk选择android 4.0以上版本就不会出现那个了。
不过这样低版本的ADT就不支持了。
我现在真的是不知道怎么解决这个appcompat_v7出错情况。希望有高人能指点迷津
回复 使用道具 举报
10下面还没有那么多的values配置,如果配置为10,需要删除
回复 使用道具 举报
沙拉很好吃 发表于 2014-10-23 09:43
10下面还没有那么多的values配置,如果配置为10,需要删除

什么意思,没明白:dizzy:
回复 使用道具 举报
您需要登录后才可以回帖 登录 | 加入黑马