在Eclipse中制作Android peoject

时间:2015-07-22 12:56:04

标签: java android xml eclipse

我有问题。今天我开始学习Android编码但是当我做它有很多错误而我无法解决它(我的最低API级别为10,Target为10,编译为22且主题为无)我使用最新版本ADT和Eclipse的版本

[2015-07-22 17:17:40 - MyFirstApp] G:\WorkPlace\Android\Pr_1\MyFirstApp\res\values\styles.xml:7: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'.
[2015-07-22 17:17:40 - MyFirstApp] 
[2015-07-22 17:17:40 - MyFirstApp] G:\WorkPlace\Android\Pr_1\MyFirstApp\res\values-v11\styles.xml:7: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'.
[2015-07-22 17:17:40 - MyFirstApp] 
[2015-07-22 17:17:40 - MyFirstApp] G:\WorkPlace\Android\Pr_1\MyFirstApp\res\values-v14\styles.xml:8: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.DarkActionBar'.
[2015-07-22 17:17:40 - MyFirstApp] 
[2015-07-22 17:17:41 - MyFirstApp] G:\WorkPlace\Android\Pr_1\MyFirstApp\res\values\styles.xml:7: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'.
[2015-07-22 17:17:41 - MyFirstApp] 
[2015-07-22 17:17:41 - MyFirstApp] G:\WorkPlace\Android\Pr_1\MyFirstApp\res\values-v11\styles.xml:7: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'.
[2015-07-22 17:17:41 - MyFirstApp] 
[2015-07-22 17:17:41 - MyFirstApp] G:\WorkPlace\Android\Pr_1\MyFirstApp\res\values-v14\styles.xml:8: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.DarkActionBar'.
[2015-07-22 17:17:41 - MyFirstApp] 
[2015-07-22 17:18:01 - MyFirstApp] G:\WorkPlace\Android\Pr_1\MyFirstApp\res\values\styles.xml:7: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'.
[2015-07-22 17:18:01 - MyFirstApp] 
[2015-07-22 17:18:01 - MyFirstApp] G:\WorkPlace\Android\Pr_1\MyFirstApp\res\values-v11\styles.xml:7: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'.
[2015-07-22 17:18:01 - MyFirstApp] 
[2015-07-22 17:18:01 - MyFirstApp] G:\WorkPlace\Android\Pr_1\MyFirstApp\res\values-v14\styles.xml:8: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.DarkActionBar'.
[2015-07-22 17:18:01 - MyFirstApp] 
[2015-07-22 17:18:33 - MyFirstApp] G:\WorkPlace\Android\Pr_1\MyFirstApp\res\values\styles.xml:7: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'.
[2015-07-22 17:18:33 - MyFirstApp] 
[2015-07-22 17:18:33 - MyFirstApp] G:\WorkPlace\Android\Pr_1\MyFirstApp\res\values-v11\styles.xml:7: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'.
[2015-07-22 17:18:33 - MyFirstApp] 
[2015-07-22 17:18:33 - MyFirstApp] G:\WorkPlace\Android\Pr_1\MyFirstApp\res\values-v14\styles.xml:8: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.DarkActionBar'.
[2015-07-22 17:18:33 - MyFirstApp] 

我该怎么办?

4 个答案:

答案 0 :(得分:1)

尝试用这些小信息来解决可能发生的事情是很难的。您是否导入了支持库? Tutorial here

你可以从那里开始。此外,如果您开始我建议您学习如何使用Android Studio

答案 1 :(得分:0)

您必须选择Target并编译版本22。 因为支持库中提供了 Theme.AppCompat.Light 样式 我解决了你的问题。 Support Library

答案 2 :(得分:0)

两种解决方案

1)用android:Theme.Light

替换所有主题

2)您可以添加添加appcompat_v7库来解决此问题

答案 3 :(得分:0)