I am trying to upgrade my appcompat-v7 in an Android Studio project from v20.0.0 to 21.0.0 to use the material composition component, but I always get the same error:
Error: The color attribute is already defined.
I do not know what to do to fix this error, I searched the Internet, but I can not get an answer. Here is my gradle:
android { compileOptions.encoding = "iso-8859-1" compileSdkVersion 21 buildToolsVersion "21.1.1" defaultConfig { applicationId "com.test" minSdkVersion 11 targetSdkVersion 22 } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt' } } } dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) compile 'com.android.support:support-v4:20.0.0' compile 'com.google.http-client:google-http-client-gson:1.19.0' compile 'com.google.code.gson:gson:2.2.4' compile "com.android.support:appcompat-v7:21.0.+" }
Here is the path in which there is conflict
C:\Users\Abel Dominguez\Documents\PROYECTOS_ANDROID\definitivos\d2\app\build\intermediates\exploded-aar\com.android.support\appcompat-v7\21.0.3\res\values\values.xml
and this is another error:
Error:Execution failed for task ':app:processDebugResources'. > com.android.ide.common.internal.LoggedErrorException: Failed to run command: C:\Users\Abel Dominguez\AppData\Local\Android\sdk1\build-tools\build-tools-21.1.1\aapt.exe package -f --no-crunch -IC:\Users\Abel Dominguez\AppData\Local\Android\sdk1\platforms\android-21\android.jar -MC:\Users\Abel Dominguez\Documents\PROYECTOS_ANDROID\definitivos\d2\app\build\intermediates\manifests\full\debug\AndroidManifest.xml -SC:\Users\Abel Dominguez\Documents\PROYECTOS_ANDROID\definitivos\d2\app\build\intermediates\res\debug -AC:\Users\Abel Dominguez\Documents\PROYECTOS_ANDROID\definitivos\d2\app\build\intermediates\assets\debug -m -JC:\Users\Abel Dominguez\Documents\PROYECTOS_ANDROID\definitivos\d2\app\build\generated\source\r\debug -FC:\Users\Abel Dominguez\Documents\PROYECTOS_ANDROID\definitivos\d2\app\build\intermediates\res\resources-debug.ap_ --debug-mode --custom-package com.wherefriend -0 apk --output-text-symbols C:\Users\Abel Dominguez\Documents\PROYECTOS_ANDROID\definitivos\d2\app\build\intermediates\symbols\debug Error Code: 1 Output: C:\Users\Abel Dominguez\Documents\PROYECTOS_ANDROID\definitivos\d2\app\build\intermediates\res\debug\values\values.xml:94: error: Attribute "color" has already been defined
android appcompat
Abel morgan
source share