ranxrose
ranxrose

Reputation: 255

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

}

Upvotes: 19

Views: 25594

Answers (15)

kitdesai
kitdesai

Reputation: 1688

Was connected to my VPN, which was unable to access the url:

http://maven.fabric.io/public/io/fabric/tools/gradle/maven-metadata.xml

Disconnected, and everything was good to go

Upvotes: 0

spico
spico

Reputation: 111

I still had the error despite all solutions proposed in this post. My solution came from the way Android Studio handles HTTP Proxy settings. I first added authentication on my proxy then applied the changes. On Linux, Android studio creates a .gradle/gradle.properties file that (is supposed to) contains the information filled in HTTP Proxy settings. This file is then shared by all projects.

But proxyUser and proxyPassword were empty, despite being filled in the GUI !

systemProp.http.proxyUser=  
systemProp.http.proxyPassword=  

Maybe for secure reason, to not show anything but it should at least some info like what it has been filled in the GUI settings. I filled them directly in the gradle.properties file and it worked ! So beware that Android Studio (3.3) has some issues dealing with authenticated proxy.....

Upvotes: 0

ganesh konathala
ganesh konathala

Reputation: 317

In AndroidStudio go to File > settings > plugins > browse repositories >

search for fabric and install it now do a restart for android studio

Upvotes: 0

Vinay John
Vinay John

Reputation: 1029

Just go to File->Invalidate Cache/Restart, and select "Invalidate and Restart". Worked for me.

Upvotes: 0

pRaMoD
pRaMoD

Reputation: 9

Go to File->Invalidate Cache/Restart->Invalidate and Restart.

If this doesn't resolve your problem, then

  • Check your Internet Connection.
  • If it's connected then change your network connection & try again.

Upvotes: 0

Rasoul Miri
Rasoul Miri

Reputation: 12222

Just use proxy for this issuses. There error indicates that proxy authentication is needed. To authenticate to your proxy server go back to File->Setting->HTTP Proxy, check the box for Proxy authentication and enter your credentials there. Also, click the check connection button to test that your connection is successful.

Upvotes: 0

demo.b
demo.b

Reputation: 3439

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.

Upvotes: 4

Mr.India
Mr.India

Reputation: 674

For me, there was a host entry for the given URL in the host file, hence URL was not accessible. removed host entry and started working.

Upvotes: 0

AlphaBoom
AlphaBoom

Reputation: 56

I just restart Android Studio.Now it's working.

Upvotes: 0

TomCobo
TomCobo

Reputation: 2916

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.

Upvotes: 6

CodeShadow
CodeShadow

Reputation: 3652

I Invalidated the cache for android studio and it worked fine.

Upvotes: 0

Shanki Bansal
Shanki Bansal

Reputation: 1740

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

Upvotes: 8

turbandroid
turbandroid

Reputation: 2306

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

Upvotes: 26

cakan
cakan

Reputation: 2117

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

Upvotes: 2

ranxrose
ranxrose

Reputation: 255

I reinstalled the plugin from disk (when i tried from repo, it didn't work. Maybe it had something to do with aws like @davis said). Now it's working.

Upvotes: 0

Related Questions