title: Duplicate class androidx.lifecycle.ViewModelLazy found in modules lifecycle-viewmodel-2.5.0-runtime
body: <p>I'm using <strong>Android Studio Chipmunk | 2021.2.1 Patch 2.</strong></p>
  <p>I get the following error when I use the <code>implementation 'androidx.appcompat:appcompat:1.5.0'</code> version.</p>
  <blockquote>
  <p>Duplicate class androidx.lifecycle.ViewModelLazy found in modules
  lifecycle-viewmodel-2.5.0-runtime
  (androidx.lifecycle:lifecycle-viewmodel:2.5.0) and
  lifecycle-viewmodel-ktx-2.3.1-runtime
  (androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.1) Duplicate class
  androidx.lifecycle.ViewTreeViewModelKt found in modules
  lifecycle-viewmodel-2.5.0-runtime
  (androidx.lifecycle:lifecycle-viewmodel:2.5.0) and
  lifecycle-viewmodel-ktx-2.3.1-runtime
  (androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.1)</p>
  </blockquote>
  <p>It works fine after rolling back to the previous <code>implementation 'androidx.appcompat:appcompat:1.4.2'</code> version.</p>
  <p><code>build.gradle</code>:</p>
  <pre><code>plugins {
      id 'com.android.application'
      id 'kotlin-android'
      id 'kotlin-kapt'
  }
  
  android {
      compileSdk 32
  
      defaultConfig {
          applicationId &quot;com.halil.ozel.darkmode&quot;
          minSdk 28
          targetSdk 32
          versionCode 1
          versionName &quot;1.0&quot;
  
          testInstrumentationRunner &quot;androidx.test.runner.AndroidJUnitRunner&quot;
      }
  
      buildTypes {
          release {
              minifyEnabled false
              proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
          }
      }
      compileOptions {
          sourceCompatibility JavaVersion.VERSION_1_8
          targetCompatibility JavaVersion.VERSION_1_8
      }
      kotlinOptions {
          jvmTarget = '1.8'
      }
      buildFeatures {
          dataBinding true
      }
  }
  
  dependencies {
      implementation 'androidx.core:core-ktx:1.8.0'
      implementation 'androidx.appcompat:appcompat:1.4.2'
      implementation 'com.google.android.material:material:1.6.1'
      implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
  
      // Preference
      implementation &quot;androidx.preference:preference-ktx:1.2.0&quot;
  }
  </code></pre>
  <p>Can anyone help with similar error?</p>
  <p>Thanks.</p>