Minimum supported Gradle version is 6.5. Current version is 6.1.1. If using the gradle wrapper, try

Minimum supported Gradle version is 6.5. Current version is 6.1.1. If using the gradle wrapper, try,第1张

AndroidStudio在导入别人的项目时发生报错:

FAILURE: Build failed with an exception.

* Where:
Build file 'E:\android\study_module-main\app\build.gradle' line: 2

* What went wrong:
An exception occurred applying plugin request [id: 'com.android.application']
> Failed to apply plugin [id 'com.android.internal.version-check']
   > Minimum supported Gradle version is 6.5. Current version is 6.1.1. If using the gradle wrapper, try editing the distributionUrl in E:\android\study_module-main\gradle\wrapper\gradle-wrapper.properties to gradle-6.5-all.zip

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org


这个错误是因为没有gradle-wrapper.properties文件,也就没有设置gradle的版本,于是就随便配了个低版的gradle。
这时只需新建一个项目,把新项目目录下的gradle目录复制到该目录下(也可以从现有的能运行的项目下复制),并修改gradle-wrapper.properties里的gradle版本到相应的版本就行了。

要是已经有gradle-wrapper.properties文件,可以直接修改gradle版本到相应的版本

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/web/992164.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-21
下一篇 2022-05-21

发表评论

登录后才能评论

评论列表(0条)

保存