title: Gradle Build error with Crashlytics Android Studio
body: <p>My code was compiling correctly all this while but now I'm suddenly encountering the following error:</p>
  
  <blockquote>
    <p>Error:A problem occurred configuring project ':app'.</p>
    
    <blockquote>
      <p>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 <a href="http://download.crashlytics.com/maven/com/crashlytics/tools/gradle/crashlytics-gradle/maven-metadata.xml" rel="nofollow">http://download.crashlytics.com/maven/com/crashlytics/tools/gradle/crashlytics-gradle/maven-metadata.xml</a>.
      Could not GET '<a href="http://download.crashlytics.com/maven/com/crashlytics/tools/gradle/crashlytics-gradle/maven-metadata.xml" rel="nofollow">http://download.crashlytics.com/maven/com/crashlytics/tools/gradle/crashlytics-gradle/maven-metadata.xml</a>'.
      download.crashlytics.com: nodename nor servname provided, or not known</p>
    </blockquote>
  </blockquote>
  
  <p>This is what my build file looks like:</p>
  
  <pre><code>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'
  }
  </code></pre>
  
  <p>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</p>