我想在eclipse中创建一个android项目。看起来很简单。我下载并安装了:
eclipse 版本:
Version: Luna Service Release 1 (4.4.1)
Build id: 20140925-1800
ADT 最新版本来自:
https://dl-ssl.google.com/android/eclipse/
在 Windows 64 位上。
当我创建新项目时,我按照向导进行以下设置:
应用程序名称:DemoProject 项目名称: 演示项目 包名称:com.example.demoproject 最低 SDK:API8 目标:API21 使用 API21 编译 主题:带有深色操作栏的全息光
在工作区中创建客户启动器图标、创建 Activity 、创建项目
图标是文本、ImF、完整填充和圆形选项。
然后,我选择“空白 Activity ”并在下一页上保留默认值。然后我按完成。向导页面保持打开状态,并在控制台 View 中显示以下内容:
[2014-11-25 22:39:15 - DemoProject] C:\Users\Andy\workspace\DemoProject\res\values\styles.xml:7: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'.
[2014-11-25 22:39:15 - DemoProject]
[2014-11-25 22:39:15 - DemoProject] C:\Users\Andy\workspace\DemoProject\res\values-v11\styles.xml:7: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'.
[2014-11-25 22:39:15 - DemoProject]
[2014-11-25 22:39:15 - DemoProject] C:\Users\Andy\workspace\DemoProject\res\values-v14\styles.xml:8: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.DarkActionBar'.
[2014-11-25 22:39:15 - DemoProject]
[2014-11-25 22:39:16 - DemoProject] C:\Users\Andy\workspace\DemoProject\res\values\styles.xml:7: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'.
[2014-11-25 22:39:16 - DemoProject]
[2014-11-25 22:39:16 - DemoProject] C:\Users\Andy\workspace\DemoProject\res\values-v11\styles.xml:7: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'.
[2014-11-25 22:39:16 - DemoProject]
[2014-11-25 22:39:16 - DemoProject] C:\Users\Andy\workspace\DemoProject\res\values-v14\styles.xml:8: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.DarkActionBar'.
[2014-11-25 22:39:16 - DemoProject]
[2014-11-25 22:39:21 - DemoProject] C:\Users\Andy\workspace\DemoProject\res\values\styles.xml:7: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'.
[2014-11-25 22:39:21 - DemoProject]
[2014-11-25 22:39:21 - DemoProject] C:\Users\Andy\workspace\DemoProject\res\values-v11\styles.xml:7: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'.
[2014-11-25 22:39:21 - DemoProject]
[2014-11-25 22:39:21 - DemoProject] C:\Users\Andy\workspace\DemoProject\res\values-v14\styles.xml:8: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.DarkActionBar'.
[2014-11-25 22:39:21 - DemoProject]
真的不确定下一步是什么!?
最佳答案
转到 Android SDK Manager 并下载 Android 支持库,如下所述:No resource found that matches the given name '@style/Theme.AppCompat.Light' .
由于您想从 8 级开始支持 Api,并且该主题发生了很大变化,因此您需要一些库来实现“复古兼容性”。 编码时还要注意管理不同的版本并导入正确的包。
关于android - 新的Android项目未能成功创建,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27138139/