Reputation: 549
My code was compiling correctly all this while but now I'm suddenly encountering the following error:
Error:A problem occurred configuring project ':app'.
Could not resolve all dependencies for configuration ':app:classpath'. Could not resolve com.crashlytics.tools.gradle:crashlytics-gradle:1.+. Required by: EnergyLens:app:unspecified Failed to list versions for com.crashlytics.tools.gradle:crashlytics-gradle. Unable to load Maven meta-data from http://download.crashlytics.com/maven/com/crashlytics/tools/gradle/crashlytics-gradle/maven-metadata.xml. Could not GET 'http://download.crashlytics.com/maven/com/crashlytics/tools/gradle/crashlytics-gradle/maven-metadata.xml'. download.crashlytics.com: nodename nor servname provided, or not known
This is what my build file looks like:
buildscript {
repositories {
maven { url 'http://download.crashlytics.com/maven' }
}
dependencies {
classpath 'com.crashlytics.tools.gradle:crashlytics-gradle:1.+'
}
}
apply plugin: 'com.android.application'
apply plugin: 'crashlytics'
repositories {
maven { url 'http://download.crashlytics.com/maven' }
}
android {
compileSdkVersion 21
buildToolsVersion "21.1.2"
defaultConfig {
applicationId "com.iiitd.muc.energylens"
minSdkVersion 14
targetSdkVersion 19
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
dependencies {
compile 'com.android.support:support-v4:21.0.3'
compile 'com.google.android.gms:play-services:+'
compile files('libs/achartengine-1.1.0.jar')
compile files('libs/android-support-v13.jar')
compile 'com.crashlytics.android:crashlytics:1.+'
}
configurations {
all*.exclude group: 'com.android.support', module: 'support-v4'
}
I had encountered this problem before; cleaning and rebuilding the project, but I'm getting this error again. Can someone please help me out of this mess and tell me why this problem occurs again and again
Upvotes: 1
Views: 2674
Reputation: 2255
In addition to your own answer, you can try pinging their servers to see if they're up or not:
ping download.crashlytics.com
Taken from Crashlytics with Android Studio build error
Upvotes: 1
Reputation: 549
I'm answering my own question. Since, this happens rather erratically and is in no way connected to my network connection, I believe this occurs because of the crashlythics server being down.
I rebuilt the project the next day and it happened perfectly.
Upvotes: 3