title: ./gradlew command line error after updating Android Studio
body: <p>After updating Android studio to 3.2, and making the corresponding changes to the gradle version and gradle plugins, I can no longer run ./gradlew from the command line without getting errors.  I can still sync gradle and build the app from the toolbar however.  The error I get is:</p>
  
  <pre><code>&gt; Failed to apply plugin [id 'com.android.application']
  &gt; Could not create an instance of type com.android.build.gradle.AppExtension_Decorated.
    &gt; Could not create an instance of type com.android.build.gradle.internal.api.DefaultAndroidSourceSet.
       &gt; Uninitialized object exists on backward branch 70
         Exception Details:
           Location:
             com/android/build/gradle/internal/scope/BuildArtifactsHolder.newArtifact(Lcom/android/build/api/artifact/BuildableArtifact;)Lcom/android/build/gradle/internal/scope/BuildArtifactsHolder$BuildableArtifactData; @119: goto
           Reason:
             Error exists in the bytecode
  </code></pre>
  
  <p>Any help in understanding what is going wrong would be really appreciated.  I am using the jdk embedded in Android Studio, and have tried deleting various folders like .gradle, build, .idea and reimporting the project, but nothing seems to fix it.  I am using Kotlin if that is relevant. Not really sure how to go about debugging this. </p>
  
  <p>gradle-wrapper.properties</p>
  
  <pre><code>distributionUrl=https\://services.gradle.org/distributions/gradle-4.5-all.zip
  </code></pre>
  
  <p>relevant portion of project root build.gradle</p>
  
  <pre><code>buildscript {
      repositories {
          google()
          jcenter()
      }
  dependencies {
      classpath 'com.android.tools.build:gradle:3.2.0-alpha08'
      classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.2.31"
  }
  </code></pre>