title: android-jetifier: "Could not resolve all artifacts"; "Failed to transform artifact" on new project
body: <p>I have a relatively new project that I'm trying to build. Gradle syncs fine, but whenever I try to build, I get an error like this:</p>
  
  <pre><code>Execution failed for task ':app:kaptGenerateStubsDebugKotlin'.
  &gt; Could not resolve all artifacts for configuration ':app:debugCompileClasspath'.
     &gt; Failed to transform artifact 'common.jar (com.android.tools:common:26.4.0)' to match attributes {artifactType=android-classes, org.gradle.usage=java-runtime-jars}.
        &gt; Execution failed for JetifyTransform: C:\Users\Dave\.gradle\caches\modules-2\files-2.1\com.android.tools\common\26.4.0\539939e284fba9fe343b890a6e21c9333767c886\common-26.4.0.jar.
           &gt; Failed to transform 'C:\Users\Dave\.gradle\caches\modules-2\files-2.1\com.android.tools\common\26.4.0\539939e284fba9fe343b890a6e21c9333767c886\common-26.4.0.jar' using Jetifier. Reason: The given artifact contains a string literal with a package reference 'android.support.design.widget' that cannot be safely rewritten. Libraries using reflection such as annotation processors need to be updated manually to add support for androidx.. (Run with --stacktrace for more details.)
     &gt; Failed to transform artifact 'bundletool.jar (com.android.tools.build:bundletool:0.7.2)' to match attributes {artifactType=android-classes, org.gradle.usage=java-runtime-jars}.
        &gt; Execution failed for JetifyTransform: C:\Users\Dave\.gradle\caches\modules-2\files-2.1\com.android.tools.build\bundletool\0.7.2\31f71b66edcbe41de0268e14c961a7799a03d42a\bundletool-0.7.2.jar.
           &gt; Failed to transform 'C:\Users\Dave\.gradle\caches\modules-2\files-2.1\com.android.tools.build\bundletool\0.7.2\31f71b66edcbe41de0268e14c961a7799a03d42a\bundletool-0.7.2.jar' using Jetifier. Reason: The given artifact contains a string literal with a package reference 'android.support.design.widget' that cannot be safely rewritten. Libraries using reflection such as annotation processors need to be updated manually to add support for androidx.. (Run with --stacktrace for more details.)
  </code></pre>
  
  <p>I only started this project a week ago, and have been using the stable branch of Android Studio and using Gradle plugin 3.5. So, anyone have any ideas how to fix this?</p>
  
  <p><strong>What I've tried:</strong></p>
  
  <ul>
  <li>Disabling Jetifier in gradle.properties left me with errors about old and new databinding dependencies.</li>
  <li>Rolling back to Gradle plugin 3.4.2 gave the same error as above.</li>
  <li>Adding <code>android.jetifier.blacklist = pass</code> to gradle.properties left me with the same errors as above.</li>
  <li>Adding <code>android.databinding.enableV2=true</code> to gradle.properties left me with the same errors as above.</li>
  <li>Running the "Migrate to AndroidX" refactor in Android Studio actually left me with this weird refactor preview: <a href="https://i.stack.imgur.com/NpQPD.jpg" rel="noreferrer"><img src="https://i.stack.imgur.com/NpQPD.jpg" alt="Why am I refactoring the library that I&#39;m trying to refactor to?"></a></li>
  <li>Removing <code>apply plugin: 'kotlin-kapt'</code> from my app-level build.gradle left me with the same errors as above.</li>
  <li>Cleaning and rebuilding doesn't work.</li>
  <li>Invalidating and restarting doesn't work.</li>
  </ul>
  
  <p><strong>EDIT 1:</strong> Gradle dependencies, for the curious... I don't think I'm using anything particularly weird here.</p>
  
  <pre><code>dependencies {
      implementation fileTree(dir: 'libs', include: ['*.jar'])
      //Kotlin stuff
      implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
      implementation 'androidx.appcompat:appcompat:1.1.0'
      implementation 'androidx.core:core-ktx:1.1.0'
      implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.0"
      implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.0"
      //Test tools
      testImplementation 'junit:junit:4.12'
      androidTestImplementation 'androidx.test:runner:1.2.0'
      androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
      //UI
      implementation 'com.google.android.material:material:1.1.0-alpha10'
      implementation 'androidx.coordinatorlayout:coordinatorlayout:1.1.0-beta01'
      implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
      implementation 'androidx.recyclerview:recyclerview:1.0.0'
      implementation 'androidx.activity:activity:1.1.0-alpha03'
      //Lifecycle
      implementation 'androidx.lifecycle:lifecycle-extensions:2.1.0'
      implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.1.0'
      implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.2.0-alpha04'
      //Moshi for serialization
      implementation 'com.squareup.moshi:moshi:1.8.0'
      implementation 'com.squareup.moshi:moshi-kotlin:1.8.0'
      //Retrofit
      implementation 'com.squareup.retrofit2:retrofit:2.6.1'
      implementation 'com.squareup.retrofit2:converter-moshi:2.6.1'
      //Glide
      implementation 'com.github.bumptech.glide:glide:4.9.0'
      implementation 'com.github.bumptech.glide:okhttp3-integration:4.9.0'
      //Navigation
      implementation 'androidx.navigation:navigation-fragment-ktx:2.1.0'
      implementation 'androidx.navigation:navigation-common-ktx:2.1.0'
      implementation 'androidx.navigation:navigation-ui-ktx:2.1.0'
      implementation "androidx.navigation:navigation-safe-args-gradle-plugin:2.1.0"
      //Diff utils
      implementation group: 'io.github.java-diff-utils', name: 'java-diff-utils', version: '4.0'
      //Timber for logging
      implementation 'com.jakewharton.timber:timber:4.7.1'
  }
  </code></pre>
  
  <p><strong>Edit 2:</strong> Copy-pasted my Gradle dependencies into a new empty project and got the same errors. Could it be one of these dependencies?</p>
  
  <p><strong>Edit 3:</strong> Commenting out various libraries from my build.gradle (Moshi, Retrofit, Timber, Glide) also had no effect. So, I probably should submit a bug report to Google. Until then, what's the workaround?</p>
  
  <p><strong>Edit 4:</strong> With suggestions from the comments, I tried deleting my .gradle folder and rolling back to an earlier version of the Material design library. Both had no effect, but the latter added something interesting to the build log:</p>
  
  <pre><code>&gt; Transform artifact kotlin-build-common.jar (org.jetbrains.kotlin:kotlin-build-common:1.3.20) with DexingNoClasspathTransform
  AGPBI: {"kind":"error","text":"Invoke-customs are only supported starting with Android O (--min-api 26)","sources":[{}],"tool":"D8"}
  </code></pre>