下载 6.8 版和最新版 Gradle 后出现错误。
A problem occurred evaluating project ':launcher'.
< Failed to apply plugin 'com.android.internal.version-check'.
<< Minimum supported Gradle version is 7.0.2. Current version is 6.8. If using the gradle wrapper, try editing the distributionUrl...
我需要做什么?
我在添加的图片中附加了更多细节。
最佳答案
错误:
Minimum supported Gradle version is 7.0.2. Current version is 6.8.
可能的意思:
( 注意 :不要误认为“ .gradle ”-文件夹,这是一个不同的文件夹)
解决方案:
获取“\gradle”文件夹的副本从另一个工作项目(或创建一个新项目)。
或者:
解决方案:
更改“\gradle\wrapper\gradle-wrapper.properties”中的值至
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip
将我的项目移动到另一台计算机后,我遇到了同样的问题:
Minimum supported Gradle version is 7.0.2. Current version is 6.8.
Please fix the project's Gradle settings.
Gradle Settings.
单击“Gradle 设置”链接打开 Gradle 设置窗口,但 Gradle JDK 已正确设置为
version 11
:所以我的下一步是检查项目结构:
并将 Gradle 版本更新为
7.0.2
:但这反而导致了这个错误:
¤ What went wrong:
An exception occurred applying plugin request [id: 'com.android.application']
» Failed to apply plugin 'com.android.internal.version-check'.
» Minimum supported Gradle version is 7.0.2. Current version is 6.8. If using the gradle wrapper, try editing the distributionUrl in D:\Files\Code-Project\gradle\wrapper\gradle-wrapper.properties to gradle-7.0.2-all.zip
现在错误将我指向“\gradle\wrapper\gradle-wrapper.properties”文件中的问题。
调查后我发现了真正的问题——“\gradle”文件夹完全丢失了。
( 注意 :“\.gradle ”文件夹与“\gradle ”文件夹不同)
从另一个项目复制“\gradle”文件夹解决了我的问题。
现在我的“\gradle\wrapper\gradle-wrapper.properties”文件看起来像这样:
关于Android Studio 错误 "Minimum supported Gradle version is 7.0.2. Current version is 6.8.",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/69240429/