'android no implementation room 2.4.2
Unable to install version room > 2.3.0. I specify the version above - I do syns now gradle (does not show errors).
When compiling the project, it writes that it is not possible to find libraries and shows the links by which these libraries were searched, it is important to note that when you click on the link, the link is valid and the required archive is downloaded in the browser.
I tried to find a solution two days earlier but failed. I will be grateful to all who responded.
Error:
Execution failed for task ':app:checkDebugAarMetadata'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
> Failed to transform room-ktx-2.4.2.aar (androidx.room:room-ktx:2.4.2) to match attributes {artifactType=android-aar-metadata, org.gradle.category=library, org.gradle.dependency.bundling=external, org.gradle.libraryelements=aar, org.gradle.status=release, org.gradle.usage=java-runtime}.
> Could not find room-ktx-2.4.2.aar (androidx.room:room-ktx:2.4.2).
Searched in the following locations:
https://dl.google.com/dl/android/maven2/androidx/room/room-ktx/2.4.2/room-ktx-2.4.2.aar
> Failed to transform room-runtime-2.4.2.aar (androidx.room:room-runtime:2.4.2) to match attributes {artifactType=android-aar-metadata, org.gradle.category=library, org.gradle.dependency.bundling=external, org.gradle.libraryelements=aar, org.gradle.status=release, org.gradle.usage=java-runtime}.
> Could not find room-runtime-2.4.2.aar (androidx.room:room-runtime:2.4.2).
Searched in the following locations:
https://dl.google.com/dl/android/maven2/androidx/room/room-runtime/2.4.2/room-runtime-2.4.2.aar
> Failed to transform sqlite-framework-2.2.0.aar (androidx.sqlite:sqlite-framework:2.2.0) to match attributes {artifactType=android-aar-metadata, org.gradle.category=library, org.gradle.dependency.bundling=external, org.gradle.libraryelements=aar, org.gradle.status=release, org.gradle.usage=java-runtime}.
> Could not find sqlite-framework-2.2.0.aar (androidx.sqlite:sqlite-framework:2.2.0).
Searched in the following locations:
https://dl.google.com/dl/android/maven2/androidx/sqlite/sqlite-framework/2.2.0/sqlite-framework-2.2.0.aar
> Failed to transform sqlite-2.2.0.aar (androidx.sqlite:sqlite:2.2.0) to match attributes {artifactType=android-aar-metadata, org.gradle.category=library, org.gradle.dependency.bundling=external, org.gradle.libraryelements=aar, org.gradle.status=release, org.gradle.usage=java-runtime}.
> Could not find sqlite-2.2.0.aar (androidx.sqlite:sqlite:2.2.0).
Searched in the following locations:
https://dl.google.com/dl/android/maven2/androidx/sqlite/sqlite/2.2.0/sqlite-2.2.0.aar
My gradle app:
plugins {
id 'com.android.application'
id 'org.jetbrains.kotlin.android'
id 'kotlin-kapt'
}
android {
compileSdk 32
defaultConfig {
applicationId "com.example.roomtest"
minSdk 24
targetSdk 32
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
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'
}
}
dependencies {
implementation 'androidx.core:core-ktx:1.7.0'
implementation 'androidx.appcompat:appcompat:1.4.1'
implementation 'com.google.android.material:material:1.6.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
implementation "androidx.room:room-ktx:2.4.2"
implementation 'androidx.room:room-common:2.4.2'
kapt "androidx.room:room-compiler:2.4.2"
androidTestImplementation "androidx.room:room-testing:2.4.2"
}
My gradle project:
plugins {
id 'com.android.application' version '7.1.2' apply false
id 'com.android.library' version '7.1.2' apply false
id 'org.jetbrains.kotlin.android' version '1.6.21' apply false
}
task clean(type: Delete) {
delete rootProject.buildDir
}
My settings.gradle:
pluginManagement {
repositories {
gradlePluginPortal()
google()
mavenCentral()
}
}
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
}
}
rootProject.name = "roomtest"
include ':app'
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
