It is not possible to add a configuration named "testCompile" because a configuration with the same name already exists

When upgrading to the Gradle 1.1.0 plugin, I kept getting the following error

Cannot add a configuration with name 'testCompile' as a configuration with that name already exists

I also use the Robolectric gradle plugin from here , v0.14.0.

The new Gradle 1.1.0 plugin adds additional unit testing support, so I suspect that Gradle and Robolectric plugins are struggling to use 'testCompile', although I'm not sure how to solve this problem.

+5
source share
3 answers

, :

gradle script:

 apply plugin: 'org.robolectric'

 dependencies {
    classpath 'org.robolectric:robolectric-gradle-plugin:1.0.0'
 }

gradle 1.1.0. 1.1.0-rci, . build.gradle:

  dependencies {
    classpath 'com.android.tools.build:gradle:1.1.0-rc1'
}

Ran sync project gradle , . , .

+8

, .

apply: , , .

0

All Articles