title: Gradle sync failed: Unable to find method
body: <p>I try to import a project in Android studio. When importing it, i've got an Error with Gradle :</p>
  
  <pre><code>Gradle sync failed: Unable to find method 
  
  'org.gradle.api.artifacts.Configuration.setExtendsFrom(Ljava/lang/Iterable;)Lorg/gradle/api/artifacts/Configuration;'.
  </code></pre>
  
  <p>I have tried :</p>
  
  <ul>
  <li><p>Re-download dependencies and sync project: Fail (same error).</p></li>
  <li><p>Stop Gradle build processes: Fail (same error).</p></li>
  <li><p>Delete the .graddle in the home directory: Fail (same error).</p></li>
  <li><p>Invalidate cache and restart Fail (same error).</p></li>
  <li><p>Uninstall and reinstall Android studio and SDK: Fail (same error).</p></li>
  </ul>
  
  <p><strong>/build.gradle :</strong></p>
  
  <pre><code>// Top-level build file where you can add configuration options common to all sub-projects/modules.
  
  buildscript {
      repositories {
          jcenter()
      }
      dependencies {
          classpath 'com.android.tools.build:gradle:2.1.0'
  
          // NOTE: Do not place your application dependencies here; they belong
          // in the individual module build.gradle files
      }
  }
  
  allprojects {
      repositories {
          jcenter()
      }
  }
  </code></pre>
  
  <p><strong>/app/build.gradle</strong></p>
  
  <pre><code>apply plugin: 'com.android.application'
  //apply plugin: 'android'
  
  android {
      compileSdkVersion 17
      buildToolsVersion '20.0.0'
      defaultConfig {
          applicationId 'xxx.xxx.xxx'
          minSdkVersion 17
          targetSdkVersion 17
          versionCode 1
          versionName '1.0'
      }
      buildTypes {
          release {
              minifyEnabled true
              proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
          }
          buildPB {
              debuggable false
              jniDebuggable false
              renderscriptDebuggable false
  
              zipAlignEnabled true
          }
      }
      productFlavors {
      }
  //    lintOptions {
  //        abortOnError false
  //    }
  }
  
  dependencies {
      compile fileTree(dir: 'libs', include: ['*.jar'])
      // You must install or update the Support Repository through the SDK manager to use this dependency.
      compile ('org.simpleframework:simple-xml:2.7.1') {
          exclude module: 'stax'
          exclude module: 'stax-api'
          exclude module: 'xpp3'
      }
      compile 'net.sf.opencsv:opencsv:2.3'
      compile 'de.greenrobot:greendao:1.3.7'
      // You must install or update the Support Repository through the SDK manager to use this dependency.
  //    compile 'com.android.support:support-v4:19.+'
  }
  </code></pre>