Gradle 同步失败:在以下任何来源中均未找到插件 [id: 'com.android.application', 版本: '7.1.2', apply: false]:

sae*_*uli 9 java android gradle android-studio

我已经升级了 Android Studio,之后我遇到了这个错误:

Gradle sync failed: Plugin [id: 'com.android.application', version: '7.1.2', apply: false] was not found in any of the following sources:
                - Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
                - Plugin Repositories (could not resolve plugin artifact 'com.android.application:com.android.application.gradle.plugin:7.1.2')
                Searched in the following repositories:
                Gradle Central Plugin Repository
                Google
                MavenRepo (24 s 586 ms)
Run Code Online (Sandbox Code Playgroud)

我已将 JDK 升级到 11,但没有修复该错误。我还可以做些什么?

sae*_*uli 6

解决了:

在尝试了一些其他解决方案后,我发现我没有删除gradle-wrapper.properties. 这阻止了我的项目下载依赖项。