Reputation: 33
I am a beginner in android studio, i have started creating the app named Hello World but always in the gradle build tab, its shows 2 errors. The errors i face are:
Error:(1) Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.DarkActionBar'.
Error:Execution failed for task ':app:processDebugResources'.> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'e:\Program Files\Android\sdk\build-tools\22.0.1\aapt.exe'' finished with non-zero exit value 1
This is my build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 22
buildToolsVersion '22.0.1'
defaultConfig {
applicationId "com.example.android.helloworld"
minSdkVersion 15
targetSdkVersion 22
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
} dependencies {}
What should i do now to run my program without errors, please help me........
Upvotes: 3
Views: 2163
Reputation: 14755
theme "Theme.AppCompat.Light.DarkActionBar" is declared in modul "com.android.support:appcompat-v7"
so you need something like this in your build.gradle.
dependencies {
compile 'com.android.support:appcompat-v7:22.1.1'
}
alternativly you can use "Theme.Holo.Light.DarkActionBar" instead which is part of newer android versions and does not need an extra modul.
"Theme.AppCompat.xxx" and "com.android.support:appcompat-v7" was created to allow old android versions like android-2.2 to user newer features introduced in newer android versions.
Upvotes: 3