madhan kumar madhan kumar - 2 months ago 30
Android Question Failed to execute aapt

I'm have migrated eclipse android project to android studio which has the

19. Now, I'm changed
to 23. Now the problem is Gradle shows error after adding
into dependencies.

Information:Gradle tasks [:app:clean, :app:generateDebugSources, :app:generateDebugAndroidTestSources, :app:mockableAndroidJar, :app:prepareDebugUnitTestDependencies, :app:assembleDebug]
Error:(190) Attribute "theme" has already been defined
Error:(190) Attribute "theme" has already been defined
Error:Execution failed for task ':app:processDebugResources'.
> Failed to execute aapt
Information:BUILD FAILED

My app.gradle file:

apply plugin: ''

android {
compileSdkVersion 23
buildToolsVersion "21.0.1"
useLibrary 'org.apache.http.legacy'

defaultConfig {
applicationId "com.ebooks.stories"
minSdkVersion 18
targetSdkVersion 23

buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'

dependencies {
compile files('libs/core.jar')
compile files('libs/logentries-android-2.1.2.jar')
compile files('libs/picasso-2.2.0.jar')
compile ''
compile ''
compile ''

values.xml file:

<declare-styleable name="WalletFragmentOptions"><attr format="enum" name="theme">
<enum name="holo_dark" value="0"/>
<enum name="holo_light" value="1"/>
</attr><attr format="enum" name="environment">
<enum name="production" value="1"/>
<enum name="sandbox" value="0"/>
<enum name="strict_sandbox" value="2"/>
</attr><attr format="reference" name="fragmentStyle"/><attr format="enum" name="fragmentMode">
<enum name="buyButton" value="1"/>
<enum name="selectionDetails" value="2"/>

How can I solve this any solution?


I have forget to update play-services version and buildToolsVersion. I solved the problem by changing updating play-serivces to and buildToolsVersion "23.0.3".