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

7,422 views

已经是最新版本的Eclipse adt,原本的项目运行正常。将项目创建成git项目后出现了:Error retrieving parent for item: No resource found that matches the given name   ‘Theme.AppCompat.Light’.

原因是无法找到原来的android-support-v7的支持包,需要重新添加。

解决办法:

1.右键项目 ->Properties

2.选择 Android

3.在底部 Library 选择框当中点击Add

4.在弹出的对话框中选择android-support-v7-appcompat

5.点击Apply

6.点击OK

7.clean一下项目就可以了 如图:appcompat_v7

图-1:Properties对话框

 

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>