title: Gradle error when trying to compile an old project Android Studio
body: <p>I am trying to re-compile one project that worked fine several months ago and I am getting a gradle error like this one:</p>
  
  <blockquote>
    <p>Error:(1, 0) Unable to find method<br>
    'org.gradle.api.Project.getPluginManager()Lorg/gradle/api/plugins/PluginManager;'.
    Possible causes for this unexpected error include:<ul><li>Gradle's
    dependency cache may be corrupt (this sometimes occurs after a network
    connection timeout.) Re-download dependencies
    and sync project (requires network)</li><li>The state of a Gradle
    build process (daemon) may be corrupt. Stopping all Gradle daemons may
    solve this problem. Stop Gradle build
    processes (requires restart)</li><li>Your project may be using a
    third-party plugin which is not compatible with the other plugins in
    the project or the version of Gradle requested by the
    project.</li></ul>In the case of corrupt Gradle processes, you can
    also try closing the IDE and then killing all Java processes</p>
  </blockquote>
  
  <p>I have updated the gradle version in the <code>build.gradle</code> file (project) from </p>
  
  <pre><code>dependencies {
      classpath 'com.android.tools.build:gradle:1.2.3'
  }
  </code></pre>
  
  <p>to </p>
  
  <pre><code>dependencies {
      classpath 'com.android.tools.build:gradle:3.0.1'
  }
  </code></pre>
  
  <p>I have followed the suggestions of AS with no luck.</p>
  
  <p>Could you give an advice?</p>
  
  <p>My <code>build.gradle</code> file (app) is:</p>
  
  <pre><code>apply plugin: 'com.android.application'
  
  android {
      compileSdkVersion 14
      buildToolsVersion "22.0.1"
      defaultConfig {
          applicationId 'com.aabcdata.learn.german.hd'
          minSdkVersion 14
          targetSdkVersion 14
          versionCode 6
          versionName '1.5'
      }
      buildTypes {
          release {
              minifyEnabled false
              proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
          }
      }
      productFlavors {
      }
  }
  
  dependencies {
      compile files('libs/FlurryAnalytics_3.3.2.jar')
      compile 'com.google.android.gms:play-services-ads:7.5.0'
      compile files('libs/AppTracker.jar')
      compile files('libs/presage-lib-1.6.0.jar')
  }
  </code></pre>
  
  <p>I have done a Invalidate <code>Cache/Restart</code>, as well</p>