developer82
developer82

Reputation: 13713

Android Studio - can't run project - Error retrieving parent for item

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".

What is the problem here?

Upvotes: 0

Views: 354

Answers (1)

Hussein El Feky
Hussein El Feky

Reputation: 6707

Your compile SDK version must be like the support library's installed version.

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.

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.

Hope that works for you.

Upvotes: 1

Related Questions