1

Yesterday I updated Android Studio 1.5 to Android Studio 2 and since that update my project can't be run.

I have this error:

Error:Cannot change dependencies of configuration ':android:classpath' after it has been resolved.

As I see it, I think that the error comes from my Build.gradle (project)

buildscript {
repositories {
    jcenter()
    maven { url 'https://maven.fabric.io/public' }
}

dependencies {
    classpath 'com.android.tools.build:gradle:1.5.0'
    classpath 'io.fabric.tools:gradle:1.+'
}

I changed it to:

buildscript {
repositories {
    jcenter()
    maven { url 'https://maven.fabric.io/public' }
}

dependencies {
    classpath 'com.android.tools.build:gradle:2.+'
    classpath 'io.fabric.tools:gradle:2.+'
}

It still doesn't work. Do you have any suggestions?

Morgan
  • 4,143
  • 27
  • 35
Taita Lopez
  • 81
  • 1
  • 7
  • 1
    Have you looked [at this](http://stackoverflow.com/a/35013614/503508)? – Knossos Apr 08 '16 at 08:00
  • Thanks, I looked that and commented some lines. Now it compiles, but fabric doesn't work. `buildscript { repositories { jcenter() maven { url 'https://maven.fabric.io/public' } } dependencies { //classpath 'com.android.tools.build:gradle:2.+' //classpath 'io.fabric.tools:gradle:2.+' }` It seems that new version doesn't accept classpath on dependencies... – Taita Lopez Apr 08 '16 at 10:16

1 Answers1

0

I've also updated to 2.0 and uses fabric too.

here's the buildscript and it works well.

buildscript {
repositories {
    jcenter()
        maven { url 'https://maven.fabric.io/public' }
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.0.0'
        classpath 'io.fabric.tools:gradle:1.+'
    }
}

you can have a try :)

ytinrete
  • 46
  • 6