ec新建安卓项目提示这个错误,怎么解决,新手求详细点(●'◡'●)

[2018-02-25 19:22:53 - HelloWorld] C:\Users\78570\Desktop\ec_workspace\HelloWorld\res\values\styles.xml:7: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'.
[2018-02-25 19:22:53 - HelloWorld]
[2018-02-25 19:22:53 - HelloWorld] C:\Users\78570\Desktop\ec_workspace\HelloWorld\res\values-v11\styles.xml:7: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'.
[2018-02-25 19:22:53 - HelloWorld]
[2018-02-25 19:22:53 - HelloWorld] C:\Users\78570\Desktop\ec_workspace\HelloWorld\res\values-v14\styles.xml:8: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.DarkActionBar'.
[2018-02-25 19:22:53 - HelloWorld]
[2018-02-25 19:22:54 - HelloWorld] C:\Users\78570\Desktop\ec_workspace\HelloWorld\res\values\styles.xml:7: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'.
[2018-02-25 19:22:54 - HelloWorld]
[2018-02-25 19:22:54 - HelloWorld] C:\Users\78570\Desktop\ec_workspace\HelloWorld\res\values-v11\styles.xml:7: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'.
[2018-02-25 19:22:54 - HelloWorld]
[2018-02-25 19:22:54 - HelloWorld] C:\Users\78570\Desktop\ec_workspace\HelloWorld\res\values-v14\styles.xml:8: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.DarkActionBar'.
[2018-02-25 19:22:54 - HelloWorld]
[2018-02-25 19:22:55 - HelloWorld] C:\Users\78570\Desktop\ec_workspace\HelloWorld\res\values\styles.xml:7: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'.
[2018-02-25 19:22:55 - HelloWorld]
[2018-02-25 19:22:55 - HelloWorld] C:\Users\78570\Desktop\ec_workspace\HelloWorld\res\values-v11\styles.xml:7: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'.
[2018-02-25 19:22:55 - HelloWorld]
[2018-02-25 19:22:55 - HelloWorld] C:\Users\78570\Desktop\ec_workspace\HelloWorld\res\values-v14\styles.xml:8: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.DarkActionBar'.
[2018-02-25 19:22:55 - HelloWorld]

下载appcompat就好了

这个原因可能是你创建工程时选择的SDK版本不对,或者是选择的主题不匹配。见下图。
图片说明

应该是主题不存在,导入v7包好了

使用adt开发新建一个Android app,选择支持的SDK版本如果小于11(Android3.0)就会报如下错误。

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

官网给出的答案是:

https://developer.android.com/tools/support-library/setup.html#add-library

简单来说就是新的eclipse默认模版主题UI需要使用比较高版本api,如果需要支持低版本,需要导入appCompact库来支持,网上一般给出的解法:

File->Import (android-sdk\extras\android\support\v7). Choose "appcompat"
Project-> properties->Android. In the section library "Add" and choose "appCompat"
包括stackoverflow上也有很多人遇到,但很多人通过这个解决,但我就是没办法解决。

后来发现这个是eclipse的bug,如果你引用的库和你的代码不在一个盘符,就有此异常。

摘自:http://blog.csdn.net/huiguixian/article/details/41210895/

1.建议你使用Android studio来开发Android应用,谷歌已经停止对eclipse的Android开发插件的支持了。
2.项目的minSdkVersion改成14以上,然后导入android-support-v7-appcompat库。

implementation 'com.android.support:appcompat-v7:26.1.0'

笨点的办法,新建一个可以运行的项目,把src,lib,资源文件统统一拷,manifast的在稍微改改就好了