Дублирующаяся ошибка Runnable в студии AndroidJAVA

Программисты JAVA общаются здесь
Ответить
Anonymous
 Дублирующаяся ошибка Runnable в студии Android

Сообщение Anonymous »

Причина:

Код: Выделить всё

Caused by: java.lang.RuntimeException: Duplicate class com.google.auto.value.AutoAnnotation found in modules auto-value-1.5.3 (com.google.auto.value:auto-value:1.5.3) and auto-value-annotations-1.6.3 (com.google.auto.value:auto-value-annotations:1.6.3)
Эти ошибки возникают при попытке запустить код

Код: Выделить всё

plugins {
id("com.android.application")
id("com.google.gms.google-services")
}

android {
namespace = "com.s22010151.parkspotterapp"
compileSdk = 34

defaultConfig {
applicationId = "com.s22010151.parkspotterapp"
minSdk = 24
targetSdk = 34
versionCode = 1
versionName = "1.0"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}

buildTypes {
release {
isMinifyEnabled = false
proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro")
}
}
buildFeatures {
viewBinding = true
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}

// Other configurations

//    configurations {
//        cleanedAnnotations
//        compile.exclude group: 'org.jetbrains' , module:'annotations'
//        api.exclude group: 'org.jetbrains' , module:'annotations'
//        implementation.exclude group: 'org.jetbrains' , module:'annotations'
//    }

}

dependencies {
//implementation ("com.google.auto.value:auto-value:1.5.3")
//    implementation ("com.github.Inconnu08:android-ratingreviews:1.2.0")
//    {
//        exclude group: 'org.jetbrains', module: 'annotations'
//    }
implementation("androidx.appcompat:appcompat:1.7.0")
implementation("com.google.android.material:material:1.12.0")
implementation("androidx.constraintlayout:constraintlayout:2.1.4")
implementation("com.google.firebase:firebase-auth:23.0.0")
implementation("com.google.firebase:firebase-database:21.0.0")
implementation ("com.firebaseui:firebase-ui-database:8.0.2")
implementation("com.google.firebase:firebase-storage:21.0.0")
implementation("com.google.firebase:firebase-messaging:24.0.0")
//annotationProcessor ("androidx.room:room-compiler:2.4.0-beta01")
implementation ("androidx.room:room-compiler-processing-testing:2.6.1")
testImplementation("junit:junit:4.13.2")
implementation ("com.github.bumptech.glide:glide:4.14.2")
annotationProcessor ("com.github.bumptech.glide:compiler:4.14.2")
implementation ("de.hdodenhof:circleimageview:3.1.0")
implementation ("androidx.recyclerview:recyclerview:1.3.2")
testImplementation("org.junit.jupiter:junit-jupiter:5.8.1")
androidTestImplementation("androidx.test.ext:junit:1.2.1")
androidTestImplementation("androidx.test.espresso:espresso-core:3.6.1")
implementation("com.google.android.gms:play-services-maps:19.0.0")
implementation("com.google.android.gms:play-services-location:21.3.0")
implementation("com.karumi:dexter:6.2.1")
implementation ("androidx.cardview:cardview:1.0.0")
implementation("com.github.clans:fab:1.6.4")

configurations.implementation{
exclude("org.jetbrains", "annotations")
}
configurations.api{
exclude("org.jetbrains" , "annotations")
}
configurations.compileOnly{
exclude("org.jetbrains" , "annotations")
}

// implementation ("com.google.auto.value:auto-value:1.6.3")
// annotationProcessor ("com.google.auto.value:auto-value:1.6.3")

}

Это мой файл build.gradle.kts(:app), как это исправить
Я пробовал много методов из Интернета, например как исключение, но ошибка все еще существует. Я очистил кеш, собрал чистый проект, но ошибка все еще существует.

Подробнее здесь: https://stackoverflow.com/questions/786 ... oid-studio
Ответить

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

Вернуться в «JAVA»