Android的工作室 - 不能运行项目 - 错误检索父的项目 [英] Android Studio - can't run project - Error retrieving parent for item
问题描述
我刚刚安装的Android工作室(已使用eclipse到现在为止)。我开始一个新项目。 SDK 4.0版(也尝试过不同的版本)。主要活动空白。
I've just installed Android Studio (been using eclipse until now). I started a new project. SDK version 4.0 (also tried different versions). Main Activity blank.
在项目初始化我在看摇篮打造窗口中的以下错误:
After the project initializes I see in the "Gradle Build" window the following errors:
Error:(2) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Inverse'.
Error:(2) Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Button.Colored'.
Error:Execution failed for task ':app:processDebugResources'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'E:\Android\sdk\build-tools\23.0.0\aapt.exe'' finished with non-zero exit value 1
当然,我不能运行该项目。这里没有什么特别。一切开箱即用。
And of course I can't run the project. Nothing special here. Everything "out of the box".
有什么问题吗?
推荐答案
您编译SDK版本必须像支持库的安装版本。
Your compile SDK version must be like the support library's installed version.
我假设你使用的是支持库的23版本,因为你已经安装了最新的Android工作室。因此,你需要用Android SDK的23版本太多编译您的项目。
I am assuming that you are using version 23 of the support library, since you have the latest Android Studio installed. So you need to compile your project with version 23 of the Android SDK too.
打开SDK管理器并安装最新的API到目前为止,这是API 23.更新Android支持库和Android支持库的情况下,有更新它们,然后创建一个新的项目,并设置目标版本API 23。
Open your SDK Manager and install the latest API so far which is API 23. Also update your Android Support Library and Android Support Repository in case there are updates to them, then create a new project and set target version to API 23.
希望对你有用。
这篇关于Android的工作室 - 不能运行项目 - 错误检索父的项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!