Студия Android не смогла синхронизировать или построить, но успешно выполнила задачи Gradle в сборках терминалаAndroid

Форум для тех, кто программирует под Android
Ответить Пред. темаСлед. тема
Anonymous
 Студия Android не смогла синхронизировать или построить, но успешно выполнила задачи Gradle в сборках терминала

Сообщение Anonymous »

Я пытаюсь создать простое запускаемое приложение в студии Android LadyBug 2024.2.1, исправление 1
Сбой синхронизации или сборки проекта в студии Android. результат ниже
Executing tasks: [:app:assemble, :app:testClasses] in *******

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'Whatsapp Notification Handler'.
> Could not resolve all artifacts for configuration ':classpath'.
> Could not find gradle-8.6.0.jar (com.android.tools.build:gradle:8.6.0).
Searched in the following locations:
https://dl.google.com/dl/android/maven2 ... -8.6.0.jar
> Could not find gradle-settings-api-8.6.0.jar (com.android.tools.build:gradle-settings-api:8.6.0).
Searched in the following locations:
https://dl.google.com/dl/android/maven2 ... -8.6.0.jar
> Could not find lint-model-31.6.0.jar (com.android.tools.lint:lint-model:31.6.0).
Searched in the following locations:
https://dl.google.com/dl/android/maven2 ... 31.6.0.jar
> Could not find builder-8.6.0.jar (com.android.tools.build:builder:8.6.0).
Searched in the following locations:
https://dl.google.com/dl/android/maven2 ... -8.6.0.jar
> Could not find manifest-merger-31.6.0.jar (com.android.tools.build:manifest-merger:31.6.0).
Searched in the following locations:
https://dl.google.com/dl/android/maven2 ... 31.6.0.jar
> Could not find sdk-common-31.6.0.jar (com.android.tools:sdk-common:31.6.0).
Searched in the following locations:
https://dl.google.com/dl/android/maven2 ... 31.6.0.jar
> Could not find sdklib-31.6.0.jar (com.android.tools:sdklib:31.6.0).
Searched in the following locations:
https://dl.google.com/dl/android/maven2 ... 31.6.0.jar
> Could not find repository-31.6.0.jar (com.android.tools:repository:31.6.0).
Searched in the following locations:
https://dl.google.com/dl/android/maven2 ... 31.6.0.jar
> Could not find gradle-api-8.6.0.jar (com.android.tools.build:gradle-api:8.6.0).
Searched in the following locations:
https://dl.google.com/dl/android/maven2 ... -8.6.0.jar
> Could not find builder-test-api-8.6.0.jar (com.android.tools.build:builder-test-api:8.6.0).
Searched in the following locations:
https://dl.google.com/dl/android/maven2 ... -8.6.0.jar
> Could not find ddmlib-31.6.0.jar (com.android.tools.ddms:ddmlib:31.6.0).
Searched in the following locations:
https://dl.google.com/dl/android/maven2 ... 31.6.0.jar
> Could not find aaptcompiler-8.6.0.jar (com.android.tools.build:aaptcompiler:8.6.0).
Searched in the following locations:
https://dl.google.com/dl/android/maven2 ... -8.6.0.jar
> Could not find bundletool-1.16.0.jar (com.android.tools.build:bundletool:1.16.0).
Searched in the following locations:
https://dl.google.com/dl/android/maven2 ... 1.16.0.jar
> Could not find aapt2-proto-8.6.0-11315950.jar (com.android.tools.build:aapt2-proto:8.6.0-11315950).
Searched in the following locations:
https://dl.google.com/dl/android/maven2 ... 315950.jar
> Could not find crash-31.6.0.jar (com.android.tools.analytics-library:crash:31.6.0).
Searched in the following locations:
https://dl.google.com/dl/android/maven2 ... 31.6.0.jar
> Could not find tracker-31.6.0.jar (com.android.tools.analytics-library:tracker:31.6.0).
Searched in the following locations:
https://dl.google.com/dl/android/maven2 ... 31.6.0.jar
> Could not find shared-31.6.0.jar (com.android.tools.analytics-library:shared:31.6.0).
Searched in the following locations:
https://dl.google.com/dl/android/maven2 ... 31.6.0.jar
> Could not find lint-typedef-remover-31.6.0.jar (com.android.tools.lint:lint-typedef-remover:31.6.0).
Searched in the following locations:
https://dl.google.com/dl/android/maven2 ... 31.6.0.jar
> Could not find databinding-compiler-common-8.6.0.jar (androidx.databinding:databinding-compiler-common:8.6.0).
Searched in the following locations:
https://dl.google.com/dl/android/maven2 ... -8.6.0.jar
> Could not find databinding-common-8.6.0.jar (androidx.databinding:databinding-common:8.6.0).
Searched in the following locations:
https://dl.google.com/dl/android/maven2 ... -8.6.0.jar
> Could not find baseLibrary-8.6.0.jar (com.android.databinding:baseLibrary:8.6.0).
Searched in the following locations:
https://dl.google.com/dl/android/maven2 ... -8.6.0.jar
> Could not find layoutlib-api-31.6.0.jar (com.android.tools.layoutlib:layoutlib-api:31.6.0).
Searched in the following locations:
https://dl.google.com/dl/android/maven2 ... 31.6.0.jar
> Could not find android-device-provider-ddmlib-proto-31.6.0.jar (com.android.tools.utp:android-device-provider-ddmlib-proto:31.6.0).
Searched in the following locations:
https://dl.google.com/dl/android/maven2 ... 31.6.0.jar
> Could not find android-device-provider-gradle-proto-31.6.0.jar (com.android.tools.utp:android-device-provider-gradle-proto:31.6.0).
Searched in the following locations:
https://dl.google.com/dl/android/maven2 ... 31.6.0.jar
> Could not find android-test-plugin-host-additional-test-output-proto-31.6.0.jar (com.android.tools.utp:android-test-plugin-host-additional-test-output-proto:31.6.0).
Searched in the following locations:
https://dl.google.com/dl/android/maven2 ... 31.6.0.jar
> Could not find android-test-plugin-host-coverage-proto-31.6.0.jar (com.android.tools.utp:android-test-plugin-host-coverage-proto:31.6.0).
Searched in the following locations:
https://dl.google.com/dl/android/maven2 ... 31.6.0.jar
> Could not find android-test-plugin-host-emulator-control-proto-31.6.0.jar (com.android.tools.utp:android-test-plugin-host-emulator-control-proto:31.6.0).
Searched in the following locations:
https://dl.google.com/dl/android/maven2 ... 31.6.0.jar
> Could not find android-test-plugin-host-logcat-proto-31.6.0.jar (com.android.tools.utp:android-test-plugin-host-logcat-proto:31.6.0).
Searched in the following locations:
https://dl.google.com/dl/android/maven2 ... 31.6.0.jar
> Could not find android-test-plugin-host-apk-installer-proto-31.6.0.jar (com.android.tools.utp:android-test-plugin-host-apk-installer-proto:31.6.0).
Searched in the following locations:
https://dl.google.com/dl/android/maven2 ... 31.6.0.jar
> Could not find android-test-plugin-host-retention-proto-31.6.0.jar (com.android.tools.utp:android-test-plugin-host-retention-proto:31.6.0).
Searched in the following locations:
https://dl.google.com/dl/android/maven2 ... 31.6.0.jar
> Could not find android-test-plugin-result-listener-gradle-proto-31.6.0.jar (com.android.tools.utp:android-test-plugin-result-listener-gradle-proto:31.6.0).
Searched in the following locations:
https://dl.google.com/dl/android/maven2 ... 31.6.0.jar
> Could not find builder-model-8.6.0.jar (com.android.tools.build:builder-model:8.6.0).
Searched in the following locations:
https://dl.google.com/dl/android/maven2 ... -8.6.0.jar
> Could not find dvlib-31.6.0.jar (com.android.tools:dvlib:31.6.0).
Searched in the following locations:
https://dl.google.com/dl/android/maven2 ... 31.6.0.jar
> Could not find common-31.6.0.jar (com.android.tools:common:31.6.0).
Searched in the following locations:
https://dl.google.com/dl/android/maven2 ... 31.6.0.jar
> Could not find apkzlib-8.6.0.jar (com.android.tools.build:apkzlib:8.6.0).
Searched in the following locations:
https://dl.google.com/dl/android/maven2 ... -8.6.0.jar
> Could not find protos-31.6.0.jar (com.android.tools.analytics-library:protos:31.6.0).
Searched in the following locations:
https://dl.google.com/dl/android/maven2 ... 31.6.0.jar
> Could not find signflinger-8.6.0.jar (com.android:signflinger:8.6.0).
Searched in the following locations:
https://dl.google.com/dl/android/maven2 ... -8.6.0.jar
> Could not find zipflinger-8.6.0.jar (com.android:zipflinger:8.6.0).
Searched in the following locations:
https://dl.google.com/dl/android/maven2 ... -8.6.0.jar
> Could not find annotations-31.6.0.jar (com.android.tools:annotations:31.6.0).
Searched in the following locations:
https://dl.google.com/dl/android/maven2 ... 31.6.0.jar
> Could not find apksig-8.6.0.jar (com.android.tools.build:apksig:8.6.0).
Searched in the following locations:
https://dl.google.com/dl/android/maven2 ... -8.6.0.jar

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.

BUILD FAILED in 493ms

но успешно выполняю те же самые задачи gradle студии Android в сборках терминала, и я получаю достойный APK в папке build/outputs/apk/debug.

команда, которую я запустил в терминале:
sudo ./gradlew :app:clean :app:assembleDebug :app:assembleDebugUnitTest :app:assembleDebugAndroidTest


Подробнее здесь: https://stackoverflow.com/questions/791 ... minal-buil
Реклама
Ответить Пред. темаСлед. тема

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

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

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

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

  • Похожие темы
    Ответы
    Просмотры
    Последнее сообщение

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