title: android studio - problems with Gradle
body: <p>I making a code maintenance in of android app that someone else writed in android studio.</p>
  
  <p>when i try to sync project with Gradle files, i get this error message:</p>
  
  <pre><code>23:46:27 UnsupportedMethodException
       Failed to set up Android modules in project 'BuyTheWay': Unsupported method: SourceProvider.getJniDirectories().
       The version of Gradle you connect to does not support that method.
       To resolve the problem you can change/upgrade the target version of Gradle you connect to.
       Alternatively, you can ignore this exception and read other information from the model.
  </code></pre>
  
  <p>I am using the 0.8.14 version of android studio.</p>
  
  <p>In a anser to a similar queshtion <a href="https://stackoverflow.com/questions/27078075/gradle-dsl-method-not-found-runproguard">Gradle DSL method not found: &#39;runProguard&#39;</a> , it was recommended to replace in the build.gradle file (<strong>in the app folder</strong>) the line:</p>
  
  <pre><code>runProguard false
  </code></pre>
  
  <p>with</p>
  
  <pre><code>minifyEnabled false
  </code></pre>
  
  <p>but it dosent help for me, because the compiler also marks "getDefaultProguardFile" in the line</p>
  
  <pre><code>proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt' 
  </code></pre>
  
  <p>and clains that:</p>
  
  <pre><code>cannot resolve symbol getDefaultProguardFile
  </code></pre>
  
  <p>trying a diffrent approach, and changing the build.grale <strong>in the gragle folder</strong>, dint help</p>
  
  <p>this is the original code:</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:0.14.0'
      }
  }
  
  allprojects {
      repositories {
          jcenter()
      }
  }
  </code></pre>
  
  <p>when i change </p>
  
  <pre><code>classpath 'com.android.tools.build:gradle:0.14.0'  
  </code></pre>
  
  <p>with</p>
  
  <pre><code> classpath 'com.android.tools.build:gradle:0.14.+' 
  </code></pre>
  
  <p>and try to sync project with Gradle files, i get this error message:</p>
  
  <pre><code>    Error:(17, 0) Gradle DSL method not found: 'runProguard()'
  Possible causes:
       The project 'BuyTheWay' may be using a version of Gradle that does not contain the method.
      &lt;a href="open.wrapper.file"&gt;Open Gradle wrapper file&lt;/a&gt;
      The build file may be missing a Gradle plugin.
      &lt;a href="apply.gradle.plugin"&gt;Apply Gradle plugin&lt;/a&gt;
  </code></pre>