greywolf82
greywolf82

Reputation: 22173

Android studio error with gradle 2.0.0-beta6

I've got a project with a shared lib. The folder structure is the following: RootProjects that contains the folders lib and app.

In my settings.gradle I have

include ':app', ':..:lib:app'

and in build.gradle:

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile project(':..:lib:app')
}

Now if I switch from:

classpath 'com.android.tools.build:gradle:1.5.0'

to

classpath 'com.android.tools.build:gradle:2.0.0-beta6'

I receive the following error from Android Studio:

cannot change dependencies of configuration ':..:lib:classpath' after it has been resolved

Upvotes: 2

Views: 909

Answers (1)

Silverstorm
Silverstorm

Reputation: 15835

Maybe your local gradle distribution is corrupted. Check the projects and make sure all gradle files point to the same gradle version(2.0.0-beta6 in your case). Close Android Studio delete .gradle folder from your pc (the folder located in your home directory of your computer). Then open the project again.

Upvotes: 1

Related Questions