Не удалось найти com.android.tools.build:aapt2:8.3.1-10880808.Android

Форум для тех, кто программирует под Android
Ответить
Anonymous
 Не удалось найти com.android.tools.build:aapt2:8.3.1-10880808.

Сообщение Anonymous »

после обновления до последней версии Android Studio (2024.2.1) и обновления gradle и AGP я сталкиваюсь с этими сообщениями об ошибках при попытке запуска на устройстве, но синхронизация gradle прошла успешно:

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

Could not isolate parameters com.android.build.gradle.internal.dependency.AarResourcesCompilerTransform$Parameters_Decorated@68af1da1 of artifact transform AarResourcesCompilerTransform
> Could not isolate value com.android.build.gradle.internal.dependency.AarResourcesCompilerTransform$Parameters_Decorated@68af1da1 of type AarResourcesCompilerTransform.Parameters
> Could not resolve all files for configuration ':app:detachedConfiguration3'.
> Could not find com.android.tools.build:aapt2:8.3.1-10880808.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/android/tools/build/aapt2/8.3.1-10880808/aapt2-8.3.1-10880808.pom
- https://repo.maven.apache.org/maven2/com/android/tools/build/aapt2/8.3.1-10880808/aapt2-8.3.1-10880808.pom
Required by:
project :app
мои настройки сборки следующие (все файлы объединены с именем в верхней части каждого раздела):

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

file: libs.versions.toml
[versions]
agp = "8.7.0"
junit = "4.13.2"
junitVersion = "1.1.5"
espressoCore = "3.5.1"
appcompat = "1.6.1"
material = "1.10.0"
constraintlayout = "2.1.4"
navigationFragment = "2.6.0"
navigationUi = "2.6.0"

[libraries]
junit = { group = "junit", name = "junit", version.ref = "junit" }
ext-junit = { group = "androidx.test.ext", name = "junit", version.ref = "junitVersion" }
espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "espressoCore" }
appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "appcompat" }
material = { group = "com.google.android.material", name = "material", version.ref = "material" }
constraintlayout = { group = "androidx.constraintlayout", name = "constraintlayout", version.ref = "constraintlayout" }
navigation-fragment = { group = "androidx.navigation", name = "navigation-fragment", version.ref = "navigationFragment" }
navigation-ui = { group = "androidx.navigation", name = "navigation-ui", version.ref = "navigationUi" }

[plugins]
android-application = { id = "com.android.application", version.ref = "agp"  }

file: build.gradle(application)
plugins {
alias(libs.plugins.android.application) apply false
}

file: build.gradle(module :app)
plugins {
alias(libs.plugins.android.application)
}

android {
namespace 'com.example.myapplication'
compileSdk 35

defaultConfig {
applicationId "com.example.myapplication"
minSdk 24
targetSdk 35
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
}
buildFeatures {
viewBinding true
}
}

dependencies {

implementation libs.appcompat
implementation libs.material
implementation libs.constraintlayout
implementation libs.navigation.fragment
implementation libs.navigation.ui
testImplementation libs.junit
androidTestImplementation libs.ext.junit
androidTestImplementation libs.espresso.core
}

file: gradle-wrappers.properties
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

file: settings.gradle
pluginManagement {
repositories {
google {
content {
includeGroupByRegex("com\\.android.*")
includeGroupByRegex("com\\.google.*")
includeGroupByRegex("androidx.*")
}
}
mavenCentral()
gradlePluginPortal()
}
}
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
}
}

rootProject.name = "My Application"
include ':app'

это пример проекта для студии Android.
Android Studio 2024.2.1 работает на Ubuntu 20.04
что я сделал до сих пор?
  • удаление студии Android, всех SDK и файлов gradle и установка с нуля.
  • изменение версии gradle JDK до 11, 17, 21
  • тестирование всех компилируемых версий SDK с AGP и версии Gradle из этого источника (developer.android.com
  • удаление кешей и файлы и повторная загрузка всех
  • несколько раз перезагрузка системы
  • аннулирование кэша и несколько перезапусков студии Android
  • настройка несколько новых прокси (проверенных прокси)
  • даже вручную загрузили указанный URL-адрес в существующем сообщении об ошибке
  • создали новые проекты из мастера студии Android несколько раз< /li>
    загрузка всех файлов в менеджере SDK (~20 ГБ)
    исследование stackoverflow и выполнение всех принятых ответов (хотя они относятся к предыдущим версиям)
но ошибка еще не ушла, и проблема остается.
Я считаю, что знание проблем с Gradle — это долгий путь, который я Мне это не удалось.
(сообщения о конфигурации и ошибках не совпадают, поскольку я протестировал все варианты и скопировал неправильные конфигурации)

Подробнее здесь: https://stackoverflow.com/questions/790 ... 1-10880808
Ответить

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

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

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

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

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