@rustkr

Ошибка Task :app:mergeDebugNativeDebugMetadata NO-SOURCE, Task :app:checkDebugAarMetadata FAILED. Как исправить?

Android Studio перестал работать. Раньше года 2 назад я изучал разработку приложений под Android на данной студии. Все было прекрасно. Потом полгода не заходил в студию. И вдруг он перестал компилировать код. Я уже раз 5 ее переустанавливал, но ошибка всегда одна и та же.

Создаю проект Navigation Drawer Views Activity.
Проект собирается:

Starting Gradle Daemon...
Gradle Daemon started in 1 s 618 ms
> Task :prepareKotlinBuildScriptModel UP-TO-DATE
Download https://dl.google.com/dl/android/maven2/androidx/n..., took 186 ms (5,18 kB)
Download https://dl.google.com/dl/android/maven2/com/google..., took 186 ms (4,78 kB)
Download https://dl.google.com/dl/android/maven2/androidx/n..., took 207 ms (4,78 kB)
Download https://dl.google.com/dl/android/maven2/com/google..., took 67 ms (7,13 kB)
Download https://dl.google.com/dl/android/maven2/androidx/n..., took 80 ms (18,76 kB)
Download https://dl.google.com/dl/android/maven2/androidx/n..., took 263 ms (18,59 kB)
Download https://repo.maven.apache.org/maven2/org/jetbrains..., took 265 ms (1,55 kB)
Download https://dl.google.com/dl/android/maven2/androidx/f..., took 59 ms (3,8 kB)
Download https://dl.google.com/dl/android/maven2/androidx/n..., took 60 ms (5,39 kB)
Download https://dl.google.com/dl/android/maven2/androidx/f..., took 64 ms (7,8 kB)
Download https://dl.google.com/dl/android/maven2/androidx/n..., took 82 ms (19,39 kB)
Download https://repo.maven.apache.org/maven2/org/jetbrains..., took 49 ms (1,16 kB)
Download https://dl.google.com/dl/android/maven2/androidx/f..., took 66 ms (5,26 kB)
Download https://dl.google.com/dl/android/maven2/androidx/f..., took 70 ms (8,87 kB)
Download https://dl.google.com/dl/android/maven2/androidx/n..., took 60 ms (5,97 kB)
Download https://dl.google.com/dl/android/maven2/androidx/a..., took 60 ms (3,73 kB)
Download https://dl.google.com/dl/android/maven2/androidx/n..., took 86 ms (20,02 kB)
Download https://dl.google.com/dl/android/maven2/androidx/a..., took 61 ms (7,83 kB)
Download https://dl.google.com/dl/android/maven2/androidx/a..., took 55 ms (4,56 kB)
Download https://dl.google.com/dl/android/maven2/androidx/a..., took 66 ms (8,21 kB)
Download https://dl.google.com/dl/android/maven2/androidx/n..., took 372 ms (89,88 kB)
Download https://dl.google.com/dl/android/maven2/androidx/n..., took 441 ms (128,8 kB)
Download https://dl.google.com/dl/android/maven2/androidx/n..., took 471 ms (182,51 kB)
Download https://dl.google.com/dl/android/maven2/androidx/n..., took 104 ms (91,13 kB)
Download https://dl.google.com/dl/android/maven2/androidx/f..., took 103 ms (30,13 kB)
Download https://dl.google.com/dl/android/maven2/com/google..., took 789 ms (2,2 MB)
Download https://dl.google.com/dl/android/maven2/androidx/f..., took 585 ms (353,7 kB)
Download https://dl.google.com/dl/android/maven2/androidx/a..., took 77 ms (26,4 kB)
Download https://dl.google.com/dl/android/maven2/androidx/a..., took 128 ms (142,91 kB)
Download https://repo.maven.apache.org/maven2/org/jetbrains..., took 268 ms (221,49 kB)
Download https://repo.maven.apache.org/maven2/org/jetbrains..., took 560 ms (1,67 MB)
Download https://dl.google.com/dl/android/maven2/androidx/a..., took 126 ms (49,15 kB)
Download https://dl.google.com/dl/android/maven2/androidx/f..., took 204 ms (193,92 kB)
Download https://dl.google.com/dl/android/maven2/com/google..., took 340 ms (1,12 MB)
Download https://dl.google.com/dl/android/maven2/androidx/n..., took 108 ms (26,37 kB)
Download https://dl.google.com/dl/android/maven2/androidx/f..., took 80 ms (6,46 kB)
Download https://dl.google.com/dl/android/maven2/androidx/a..., took 50 ms (5,89 kB)
Download https://dl.google.com/dl/android/maven2/androidx/n..., took 54 ms (48,13 kB)
Download https://dl.google.com/dl/android/maven2/androidx/n..., took 65 ms (58,92 kB)
Download https://dl.google.com/dl/android/maven2/androidx/n..., took 56 ms (20,8 kB)
Download https://repo.maven.apache.org/maven2/org/jetbrains..., took 186 ms (255,88 kB)
Download https://repo.maven.apache.org/maven2/org/jetbrains..., took 114 ms (323,87 kB)

BUILD SUCCESSFUL in 36s

=================================================================================

После сборки я его запускаю на API26 Android 8.0 .
Он выдает такие ошибки:

Executing tasks: [:app:assembleDebug] in project C:\Users\UserName\AndroidStudioProjects\MyApplication17
> Task :app:mergeDebugNativeDebugMetadata NO-SOURCE
> Task :app:checkDebugAarMetadata FAILED
> Task :app:compileDebugShaders NO-SOURCE
> Task :app:processDebugJavaRes NO-SOURCE
> Task :app:mergeDebugNativeLibs NO-SOURCE
> Task :app:stripDebugDebugSymbols NO-SOURCE
> Task :app:checkDebugDuplicateClasses FAILED
FAILURE: Build completed with 2 failures.

* Get more help at https://help.gradle.org

BUILD FAILED in 14s
25 actionable tasks: 25 executed

=================================================================================

Остальное вставлять не стал, так как текст очень большой.
Искал в интернете нигде нет такого примера. Может кто знает.
  • Вопрос задан
  • 587 просмотров
Решения вопроса 1
@rustkr Автор вопроса
Все решил проблему. Сначала повысил compileSdk до 34 в build.gradle.
minSdk 26, targetSdk 33.

В файл gradle.properties добавил android.useAndroidX=true
android.enableJetifier = true

В файл build.gradle добавил
dependencies {
constraints {
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.8.0") {
because("kotlin-stdlib-jdk7 is now a part of kotlin-stdlib")
}
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.0") {
because("kotlin-stdlib-jdk8 is now a part of kotlin-stdlib")
}
}
}

Дополнительная информация. Может кому то поможет.
Версия Java у меня 1.8

Вот код ошибок которые выдавала Android Studio:
https://drive.google.com/file/d/132jQXibf-cwQ-fv_w...
Ответ написан
Комментировать
Пригласить эксперта
Ответы на вопрос 1
402d
@402d
начинал с бейсика на УКНЦ в 1988
По дубликатам классов могу подсказать. Лечиться добавлением implement platform.

Мне этот способ подошёл при апгрейде до 34 апи.
https://stackoverflow.com/questions/75263047/dupli...

Попробуй сперва снизить таргет и компиле до 33 или 32.

На счёт нет исходных кодов, в настройках проверь какие сдк студия скачала.
Ответ написан
Комментировать
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Похожие вопросы