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

}
Morgan
  • 4,143
  • 27
  • 35
ranxrose
  • 245
  • 1
  • 2
  • 10
  • 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.x – davis Jun 20 '16 at 12:49
  • 1
    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. – davis Jun 20 '16 at 13:29

15 Answers15

26

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

turbandroid
  • 2,296
  • 22
  • 30
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

Shanki Bansal
  • 1,681
  • 2
  • 22
  • 32
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.

TomCobo
  • 2,886
  • 3
  • 25
  • 43
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.

demo.b
  • 3,299
  • 2
  • 29
  • 29
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/.

cakan
  • 2,099
  • 5
  • 32
  • 42
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.

ranxrose
  • 245
  • 1
  • 2
  • 10
  • 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. – Raulp Nov 23 '17 at 17:45
0

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

CodeShadow
  • 3,503
  • 1
  • 17
  • 16
0

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

AlphaBoom
  • 56
  • 6
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.

Mr.India
  • 674
  • 2
  • 9
  • 19
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.

Rasoul Miri
  • 11,234
  • 1
  • 68
  • 78
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.
pRaMoD
  • 9
  • 1
0

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

Vinay John
  • 990
  • 12
  • 13
0

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

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

ganesh konathala
  • 317
  • 1
  • 4
  • 14
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.....

Greenonline
  • 1,330
  • 8
  • 23
  • 31
spico
  • 41
  • 7
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

kitdesai
  • 1,678
  • 2
  • 10
  • 9