title: Android Studio -- Failed to apply plugin [id 'appengine']
body: <p>When I sync my project with Gradle files, I get the following errors: </p>
  
  <p><code>Caused by: org.gradle.api.internal.plugins.PluginApplicationException: Failed to apply plugin [id 'appengine']</code></p>
  
  <p>and </p>
  
  <p><code>Caused by: groovy.lang.MissingPropertyException: Could not get unknown property 'classesDir' for functional test classes of type org.gradle.api.internal.tasks.DefaultSourceSetOutput.</code></p>
  
  <p>My gradle is on the latest version and I've tried previous solutions on Stack Overflow, but none of them seem to work. </p>
  
  <p>Project Build.Gradle: </p>
  
  <pre><code>
  buildscript {
      repositories {
          jcenter()
          maven {
              url 'https://maven.google.com/'
              name 'Google'
          }
          google()
      }
      dependencies {
  
          classpath 'com.android.tools.build:gradle:3.6.3'
  
          // NOTE: Do not place your application dependencies here; they belong
          // in the individual module build.gradle files
      }
  }
  
  allprojects {
      repositories {
          jcenter()
          maven {
              url 'https://maven.google.com/'
              name 'Google'
          }
      }
  
  
  }
  
  task clean(type: Delete) {
      delete rootProject.buildDir
  }
  </code></pre>
  
  <p>Backend build.gradle: </p>
  
  <pre><code>// https://github.com/GoogleCloudPlatform/gradle-appengine-plugin
  
  buildscript {
      repositories {
          jcenter()
      }
      dependencies {
          classpath 'com.google.appengine:gradle-appengine-plugin:1.9.59'
      }
  }
  
  repositories {
      jcenter();
  }
  
  apply plugin: 'java'
  apply plugin: 'war'
  apply plugin: 'appengine'
  
  sourceCompatibility = JavaVersion.VERSION_1_7
  targetCompatibility = JavaVersion.VERSION_1_7
  
  dependencies {
    appengineSdk 'com.google.appengine:appengine-java-sdk:1.9.59'
    compile 'com.google.appengine:appengine-endpoints:1.9.18'
    compile 'com.google.appengine:appengine-endpoints-deps:1.9.18'
    compile 'javax.servlet:servlet-api:2.5'
  }
  
  appengine {
    downloadSdk = true
    appcfg {
      oauth2 = true
    }
    endpoints {
      getClientLibsOnBuild = true
      getDiscoveryDocsOnBuild = true
    }
  }
  </code></pre>
  
  <p>It seems as the main issue is the App Engine plugin, but I'm not sure how to fix that. I believe the latest gradle files are being used, which was a solution other stack overflow solutions provided, but didn't work for me. If anyone has insight on this, it'd be great. </p>