# 无法解析配置 ':app:debugRuntimeClasspath' 的所有文件。> 找不到 androidx.compose.material3:material3:1.2.0。需要者：项目 :app > > 找不到满足版本约束 '1.2.0' 的 'androidx.compose.material3:material3' 版本

- **ID:** `android/gradle-version-catalog-not-found`
- **领域:** android
- **类别:** build_error
- **验证级别:** ai_generated
- **修复率:** 92%

## 根因

版本目录或依赖声明引用了配置的仓库中不存在的库版本，或仓库（如 Maven Central、Google）不可达或缺少该工件。

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| Android Gradle Plugin 8.0 - 8.2 | active | — | — |
| Gradle 8.0 - 8.5 | active | — | — |
| Compose BOM 2023.10.01 - 2024.02.00 | active | — | — |

## 解决方案

1. ```
   Update the version catalog file (libs.versions.toml) to use a valid version from the Google Maven repository: 'material3 = "1.2.1"' and then run 'gradlew clean build'.
   ```
2. ```
   Add the Google Maven repository explicitly in settings.gradle or build.gradle: 'maven { url "https://maven.google.com" }' and ensure it's before other repositories.
   ```

## 无效尝试

- **** — If the repository is already present but the artifact doesn't exist, adding it again won't help; the version must be verified. (50% 失败率)
- **** — Older versions may not be compatible with the current Compose or AndroidX libraries, causing other build failures. (50% 失败率)
