Gradle build error cannot resolve io.fabric
Asked Answered
U

15

19

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

}
Undercarriage answered 20/6, 2016 at 3:48 Comment(2)
I'm having the same issue. It started when I changed my com.android.tools.build:gradle version from 1.x.x to 2.x.xCasilde
The issue has resolved itself (at least for me). It looks like it had something to do with amazon aws being down for a while today.Casilde
D
26

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

Dugger answered 5/9, 2016 at 4:32 Comment(0)
P
8

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

Polenta answered 26/9, 2016 at 6:19 Comment(0)
A
6

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.

Autocade answered 23/2, 2017 at 10:51 Comment(0)
U
4

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.

Unapt answered 7/2, 2018 at 20:54 Comment(0)
P
2

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

Photogenic answered 10/8, 2016 at 11:36 Comment(0)
U
0

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.

Undercarriage answered 20/6, 2016 at 22:5 Comment(1)
how did you do it?Did you remove anythign form the build.gradle scripts in order not to download it from the internet rather use it from the disk? I am using it behind the proxy and have already done the proxy settings.Macaco
U
0

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

Unexpressive answered 20/11, 2016 at 9:3 Comment(0)
D
0

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

Deviationism answered 22/3, 2017 at 2:35 Comment(0)
B
0

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.

Bakst answered 26/5, 2017 at 9:9 Comment(0)
R
0

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.

Rosenstein answered 25/2, 2018 at 7:0 Comment(0)
G
0

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.
Goatsucker answered 30/5, 2018 at 12:42 Comment(0)
T
0

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

Truncheon answered 19/9, 2018 at 6:44 Comment(0)
A
0

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

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

Archbishop answered 5/11, 2018 at 12:4 Comment(0)
D
0

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.....

Dyeing answered 16/4, 2019 at 13:3 Comment(0)
G
0

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

Gyral answered 21/4, 2020 at 20:18 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.