title: Android Studio 3.0 Canary 2: Failed to apply plugin, when using gradle 3.0.0-alpha2
body: <p>I just updated to using Android Studio 3.0 Canary 2. Upon opening my project Android Studio suggested I update the gradle version to 3.0.0-alpha2. My goal is to use the "Enable advanced profiling" Run Configuration so I can run a realtime memory-analysis. However the instant my gradle version was updated, my project fails to build. I followed the update instructions <a href="https://developer.android.com/studio/preview/features/new-android-plugin-migration.html" rel="nofollow noreferrer">here</a>. </p>
  
  <p>The only changes made were to my top-level build.gradle file and the gradle-wrapper.properties file.</p>
  
  <p>My top-level <strong>build.gradle</strong>:</p>
  
  <pre><code>buildscript {
      repositories {
          jcenter()
          mavenCentral()
          maven { url "https://jitpack.io" }
          maven { url 'https://maven.google.com' }
      }
      dependencies {
          classpath 'com.android.tools.build:gradle:3.0.0-alpha2'
          classpath 'com.github.Archinamon:GradleAspectJ-Android:2.3.0'
          classpath 'me.tatarka:gradle-retrolambda:3.5.0'
      }
  }
  
  allprojects {
      repositories {
          jcenter()
          maven { url "https://jitpack.io" }
          maven { url 'https://repo.adobe.com/nexus/content/repositories/releases/' }
          maven { url 'http://maven.localytics.com/public' }
      }
  }
  </code></pre>
  
  <p>And I updated the <strong>gradle-wrapper.properties</strong> distributionURL to:</p>
  
  <pre><code>distributionUrl=https\://services.gradle.org/distributions/gradle-4.0-milestone-1-all.zip
  </code></pre>
  
  <p>The error I get is:</p>
  
  <blockquote>
    <p>Failed to apply plugin [id'com.archinamon.aspectJ']</p>
  </blockquote>
  
  <p>And here is the offending part of my <strong>app-level build.gradle</strong> file:</p>
  
  <pre><code>import java.text.SimpleDateFormat
  
  apply plugin: 'com.android.application'
  apply plugin: 'com.archinamon.aspectj'
  aspectj {
      includeAspectsFromJar 'Android_MTAgent'
  }
  android {
      compileSdkVersion 25
      buildToolsVersion "25.0.2"
  ....
  }
  </code></pre>
  
  <p>So the problem seems to be with the aspectJ plugin. If I remove the plugin for aspectJ and the related aspectJ block (both shown above) then it compiles (I get a dimen error then though, but I already saw that mentioned elsewhere, so I guess that can be solved.)</p>
  
  <p>I'd appreciate any pointers/ideas in regard to the above issue.</p>