我刚刚将Android Studio更新到了Chipmunk版本,gradle文件同步不再起作用。同步出现以下错误:
我点击了“添加Google Maven仓库并同步项目”,但没有任何反应。我的build.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)