我剛剛將 Android Studio 更新為 Chipmunk 并且 gradle 檔案同步不再有效。同步有以下錯誤:
Could not find com.android.tools.build:gradle:7.2.0.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/7.2.0/gradle-7.2.0.pom
- https://repo.maven.apache.org/maven2/com/android/tools/build/gradle/7.2.0/gradle-7.2.0.pom
Required by:
project :
Add google Maven repository and sync project
Open File
我點擊了“添加 google Maven 存盤庫并同步專案”,但什么也沒發生。我在 build.gradle 中有以下內容:
buildscript {
ext.kotlin_version = '1.3.72'
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.2.0'
classpath("com.google.android.gms:oss-licenses-plugin:0.10.5")
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
任何人都可以提供有關如何解決此問題的提示嗎?
Android Studio Chipmunk | 2021.2.1
Build #AI-212.5712.43.2112.8512546, built on April 28, 2022
Runtime version: 11.0.12 7-b1504.28-7817840 amd64
VM: OpenJDK 64-Bit Server VM by Oracle Corporation
Windows 10 10.0
GC: G1 Young Generation, G1 Old Generation
Memory: 4096M
Cores: 16
Registry: external.system.auto.import.disabled=true, debugger.watches.in.variables=false
Non-Bundled Plugins: org.intellij.plugins.markdown (212.5457.16), com.thoughtworks.gauge (212.4746.52), org.jetbrains.kotlin (212-1.6.21-release-334-AS5457.46), com.android.aas (3.5.1), com.intellij.marketplace (212.5712.51), com.google.mad-scorecard (1.2)
uj5u.com熱心網友回復:
由于該站點上沒有列出這樣的版本,這可能是一個錯誤。請改用 7.1.3 版。
uj5u.com熱心網友回復:
AGP 7.2.0 僅在幾分鐘前發布,今天早些時候還沒有發布。再試一次。
轉載請註明出處,本文鏈接:https://www.uj5u.com/net/471533.html
標籤:安卓工作室 android-gradle-插件 安卓工作室花栗鼠
上一篇:Gradle專案同步失敗(AndroidStudio/Kotlin)
下一篇:權限java.lang.NullPointerException:嘗試呼叫虛擬方法'android.content.Contextandroid.content.Context.getApp
