Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gradle build error cannot resolve io.fabric

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"
    }

}
like image 352
ranxrose Avatar asked Jun 20 '16 03:06

ranxrose


Video Answer


5 Answers

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

like image 54
turbandroid Avatar answered Oct 18 '22 21:10

turbandroid


I just updated the crashlytics:2.5.5@aar to crashlytics:2.6.4@aar. It works of me.

dependencies {
        compile('com.crashlytics.sdk.android:crashlytics:2.6.4@aar') {
            transitive = true;
        }
    }

Check the latest code : https://fabric.io/kits/android/crashlytics/install

like image 38
Shanki Bansal Avatar answered Oct 18 '22 21:10

Shanki Bansal


I had the same issue, my problem was that I was offline. I realised looking at the error message:

Could not GET 'https://maven.fabric.io/public/io/fabric/tools/gradle/maven-metadata.xml'.
maven.fabric.io: unknown error

So going online, cleaning, build, run... worked for me.

like image 36
TomCobo Avatar answered Oct 18 '22 21:10

TomCobo


For me i did not add maven { url 'https://maven.fabric.io/public' } to my repo

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

Just in case someone is still experiencing the same issue.

like image 21
demo.b Avatar answered Oct 18 '22 20:10

demo.b


I had the same issue - it just stopped working. Problem has resolved by itself after I logged into my account at http://fabric.io/.

like image 2
cakan Avatar answered Oct 18 '22 19:10

cakan