title: Failded to find lifecycle:common-java8 library
body: <p>After I update my Gradle to 6.7.1 and Gradle plugin to 4.2 I decided to build an app with Room,coroutine,dagger-hilt and coroutine's Flow.<br />
  I add Libraryies to dependecy and i add plugins id and classpath in build.gradle files even.<br />
  then i tried to build my app. but it stops with a error<br />
  **THE ERROR: **</p>
  <pre><code>Execution failed for task ':app:checkDebugAarMetadata'.
  </code></pre>
  <blockquote>
  <p>Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
  Could not find android.arch.lifecycle:common-java8:2.2.0.
  Searched in the following locations:
  - <a href="https://dl.google.com/dl/android/maven2/android/arch/lifecycle/common-java8/2.2.0/common-java8-2.2.0.pom" rel="nofollow noreferrer">https://dl.google.com/dl/android/maven2/android/arch/lifecycle/common-java8/2.2.0/common-java8-2.2.0.pom</a>
  - <a href="https://repo.maven.apache.org/maven2/android/arch/lifecycle/common-java8/2.2.0/common-java8-2.2.0.pom" rel="nofollow noreferrer">https://repo.maven.apache.org/maven2/android/arch/lifecycle/common-java8/2.2.0/common-java8-2.2.0.pom</a>
  Required by:
  project :app</p>
  </blockquote>
  <p><strong>this is my gradle file(build.gradle(project)):</strong></p>
  <pre><code>buildscript {
  ext.kotlin_version = &quot;1.5.0&quot;
  ext {
      // App dependencies
      appCompatVersion = &quot;1.2.0&quot;
      constraintLayoutVersion = &quot;2.0.4&quot;
      coroutinesVersion = &quot;1.3.9&quot;
      dataStoreVersion = &quot;1.0.0-alpha02&quot;
      espressoVersion = &quot;3.3.0&quot;
      fragmentVersion = &quot;1.3.0-beta01&quot;
      gradleVersion = &quot;4.1.0&quot;
      hiltAndroidXVersion = &quot;1.0.0-alpha02&quot;
      hiltVersion = &quot;2.28.3-alpha&quot;
      junitVersion = &quot;4.13.1&quot;
      kotlinVersion = &quot;1.4.10&quot;
      ktxVersion = &quot;1.3.2&quot;
      lifecycleVersion = &quot;2.2.0&quot;
      materialVersion = &quot;1.3.0-alpha03&quot;
      navigationVersion = &quot;2.3.1&quot;
      roomVersion = &quot;2.2.5&quot;
      testExtJunitVersion = &quot;1.1.2&quot;
  }
  repositories {
      google()
      mavenCentral()
  }
  dependencies {
      classpath 'com.android.tools.build:gradle:4.1.0'
      classpath &quot;org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version&quot;
      classpath &quot;androidx.navigation:navigation-safe-args-gradle-plugin:$navigationVersion&quot;
      classpath &quot;com.google.dagger:hilt-android-gradle-plugin:$hiltVersion&quot;
      // NOTE: Do not place your application dependencies here; they belong
      // in the individual module build.gradle files
  }
  </code></pre>
  <p>allprojects {</p>
  <pre><code>repositories {
      google()
      mavenCentral()
  }}
  </code></pre>
  <p>task clean(type: Delete)</p>
  <p>{ delete rootProject.buildDir}</p>
  <p><strong>this is for build.gradle(module):</strong></p>
  <pre><code>plugins {
  id 'com.android.application'
  id 'kotlin-android'
  id 'kotlin-kapt'
  id 'dagger.hilt.android.plugin'
  id 'kotlin-parcelize'
  id 'androidx.navigation.safeargs.kotlin'
  </code></pre>
  <p>}</p>
  <p>android {
  compileSdkVersion 30</p>
  <pre><code>defaultConfig {
      applicationId &quot;com.example.justdoit&quot;
      minSdkVersion 21
      targetSdkVersion 30
      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'
  }
  </code></pre>
  <p>}</p>
  <p>dependencies {</p>
  <pre><code>implementation &quot;org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version&quot;
  implementation 'androidx.core:core-ktx:1.3.2'
  implementation 'androidx.appcompat:appcompat:1.2.0'
  implementation 'com.google.android.material:material:1.3.0'
  implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
  testImplementation 'junit:junit:4.+'
  androidTestImplementation 'androidx.test.ext:junit:1.1.2'
  androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
  
  // Fragment
  implementation &quot;androidx.fragment:fragment-ktx:$fragmentVersion&quot;
  
  // Lifecycle + ViewModel &amp; LiveData
  implementation &quot;androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycleVersion&quot;
  implementation &quot;androidx.lifecycle:lifecycle-livedata-ktx:$lifecycleVersion&quot;
  implementation &quot;android.arch.lifecycle:common-java8:$lifecycleVersion&quot;
  
  // Navigation Component
  implementation &quot;androidx.navigation:navigation-fragment-ktx:$navigationVersion&quot;
  implementation &quot;androidx.navigation:navigation-ui-ktx:$navigationVersion&quot;
  
  // Room
  implementation &quot;androidx.room:room-runtime:$roomVersion&quot;
  kapt &quot;androidx.room:room-compiler:$roomVersion&quot;
  implementation &quot;androidx.room:room-ktx:$roomVersion&quot;
  
  // Coroutines
  implementation &quot;org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutinesVersion&quot;
  implementation &quot;org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutinesVersion&quot;
  
  // Dagger Hilt
  implementation &quot;com.google.dagger:hilt-android:$hiltVersion&quot;
  kapt &quot;com.google.dagger:hilt-android-compiler:$hiltVersion&quot;
  implementation &quot;androidx.hilt:hilt-lifecycle-viewmodel:$hiltAndroidXVersion&quot;
  kapt &quot;androidx.hilt:hilt-compiler:$hiltAndroidXVersion&quot;
  
  // DataStore
  implementation &quot;androidx.datastore:datastore-preferences:$dataStoreVersion&quot;
  </code></pre>
  <p>}
  kapt {
  correctErrorTypes true
  }</p>
  <p><strong>Does anyone know why this happened?</strong>  thanks for your help</p>