Why I am getting these two error
Execution failed for task ':app:dataBindingMergeDependencyArtifactsDebug'.
Could not resolve all files for configuration ':app:debugCompileClasspath'. Could not find org.jetbrains.kotlin:kotlixn-stdlib:1.4.10. Required by: project :app Could not find android.arch.lifecycle:common-java8:2.2.0. Required by: project :app
Here is my build.gradle(:app)
plugins {
id 'com.android.application'
id 'kotlin-android'
id 'kotlin-android-extensions'
id 'kotlin-kapt'
id 'dagger.hilt.android.plugin'
id 'androidx.navigation.safeargs.kotlin'
}
android {
compileSdkVersion rootProject.compileSdkVersion
buildToolsVersion "29.0.3"
defaultConfig {
applicationId "com.codinginflow.mvvmtodo"
minSdkVersion rootProject.minSdkVersion
targetSdkVersion rootProject.targetSdkVersion
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
buildFeatures {
viewBinding true
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
freeCompilerArgs += "-Xopt-in=kotlinx.coroutines.ExperimentalCoroutinesApi"
}
}
dependencies {
// Default dependencies
implementation "org.jetbrains.kotlin:kotlixn-stdlib:$kotlinVersion"
implementation "androidx.core:core-ktx:$ktxVersion"
implementation "androidx.appcompat:appcompat:$appCompatVersion"
// implementation "com.google.android.material:material:$materialVersion"
implementation 'com.google.android.material:material:1.2.0-alpha02'
implementation "androidx.constraintlayout:constraintlayout:$constraintLayoutVersion"
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
testImplementation "junit:junit:$junitVersion"
androidTestImplementation "androidx.test.ext:junit:$testExtJunitVersion"
androidTestImplementation "androidx.test.espresso:espresso-core:$espressoVersion"
// Fragment
implementation "androidx.fragment:fragment-ktx:$fragmentVersion"
// Lifecycle + ViewModel & LiveData
// implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycleVersion"
// implementation "androidx.lifecycle:lifecycle-livedata-ktx:$lifecycleVersion"
implementation "androidx.lifecycle:lifecycle-extensions:2.2.0"
implementation "androidx.lifecycle:lifecycle-common-java8:2.3.1"
implementation "android.arch.lifecycle:common-java8:$lifecycleVersion"
// Navigation Component
implementation "androidx.navigation:navigation-fragment-ktx:$navigationVersion"
implementation "androidx.navigation:navigation-ui-ktx:$navigationVersion"
// Room
implementation "androidx.room:room-runtime:$roomVersion"
kapt "androidx.room:room-compiler:$roomVersion"
implementation "androidx.room:room-ktx:$roomVersion"
// Coroutines
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutinesVersion"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutinesVersion"
// Dagger Hilt
implementation "com.google.dagger:hilt-android:$hiltVersion"
kapt "com.google.dagger:hilt-android-compiler:$hiltVersion"
implementation "androidx.hilt:hilt-lifecycle-viewmodel:$hiltAndroidXVersion"
kapt "androidx.hilt:hilt-compiler:$hiltAndroidXVersion"
// DataStore
implementation "androidx.datastore:datastore-preferences:$dataStoreVersion"
}
kapt {`enter code here`
correctErrorTypes true
}
Here is my build gradle
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
// Define versions in a single place
ext {
// Sdk and tools
minSdkVersion = 21
targetSdkVersion = 30
compileSdkVersion = 30
// App dependencies
appCompatVersion = "1.2.0"
constraintLayoutVersion = "2.0.4"
coroutinesVersion = "1.3.9"
dataStoreVersion = "1.0.0-alpha02"
espressoVersion = "3.3.0"
fragmentVersion = "1.3.0-beta01"
gradleVersion = '4.2.1'
hiltAndroidXVersion = "1.0.0-alpha02"
hiltVersion = "2.28.3-alpha"
junitVersion = "4.13.1"
kotlinVersion = "1.4.10"
ktxVersion = "1.3.2"
lifecycleVersion = "2.2.0"
materialVersion = "1.3.0-alpha03"
navigationVersion = "2.3.1"
roomVersion = "2.2.5"
testExtJunitVersion = "1.1.2"
}
repositories {
jcenter()
google()
maven { url 'https://maven.google.com' }
}
dependencies {
classpath "com.android.tools.build:gradle:$gradleVersion"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
classpath "androidx.navigation:navigation-safe-args-gradle-plugin:$navigationVersion"
classpath "com.google.dagger:hilt-android-gradle-plugin:$hiltVersion"
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Please let me know which more files do you need I am a beginner so let me know your suggestions.