Gradle build error cannot resolve io.fabric

ranysella picture ranysella · Jun 20, 2016 · Viewed 22.6k times · Source

i'm using android studio 2.0. i got this error when i tried to build apk, it used to be worked but now it doesn't. :

Could not resolve all dependencies for configuration ':app:classpath'.
Could not resolve io.fabric.tools:gradle:1.+.
Required by:
MYAPP:app:unspecified
Could not resolve io.fabric.tools:gradle:1.+.
Failed to list versions for io.fabric.tools:gradle.
Unable to load Maven meta-data from https://maven.fabric.io/public/io/fabric/tools/gradle/maven-metadata.xml6.
Could not GET 'https://maven.fabric.io/public/io/fabric/tools/gradle/maven-metadata.xml'.
maven.fabric.io: unknown error

this is my build.gradle :

buildscript {
repositories {
    jcenter()
    mavenCentral()
    maven { url 'https://maven.fabric.io/public' }
}
dependencies {
    classpath 'io.fabric.tools:gradle:1.+'
    classpath 'com.android.tools.build:gradle:2.1.0'
}
}
allprojects {
repositories {
    maven { url 'https://maven.fabric.io/public' }
    maven { url "http://dl.bintray.com/populov/maven" }
    jcenter()
    mavenCentral()
    maven {
        url "http://oss.sonatype.org/content/repositories/snapshots"
    }

}

Answer

turbandroid picture turbandroid · Sep 5, 2016

For me it worked just File->Invalidate Cache/Restart, so do Invalidate and Restart.