问题:Error:No such property: GradleVersion for class: JetGradlePlugin
错误原因:IDE 版本(GradlePlugin)和 Gradle 版本不匹配导致这个错误。
GradlePlugin 版本和 AndroidStudio 版本一致,与 Gradle 版本有一张对应表distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip改成
distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip
这两个必须都要用才能使用 Gradle,而且他们还有一个严格的对应关系。
https://developer.android.google.cn/studio/releases/gradle-plugin.html#
| Plugin version | Required Gradle version |
|---|---|
| 1.0.0 - 1.1.3 | 2.2.1 - 2.3 |
| 1.2.0 - 1.3.1 | 2.2.1 - 2.9 |
| 1.5.0 | 2.2.1 - 2.13 |
| 2.0.0 - 2.1.2 | 2.10 - 2.13 |
| 2.1.3 - 2.2.3 | 2.14.1+ |
| 2.3.0+ | 3.3+ |
| 3.0.0+ | 4.1+ |
2018/1/30 Plugin version: 3.0.1 ==> Gradle version: 4.1-all
参考如下:感谢2位博主
https://www.jianshu.com/p/2ca7e87a4afc
https://blog.youkuaiyun.com/mldxs/article/details/86756031
Unable to resolve dependency for ':app@debug/compileClasspath': Could not download crashreport.aar (com.tencent.bugly:crashreport:3.1.0)
Could not download crashreport.aar (com.tencent.bugly:crashreport:3.1.0)
> Could not get resource 'https://jcenter.bintray.com/com/tencent/bugly/crashreport/3.1.0/crashreport-3.1.0.aar'.
> Could not GET 'https://jcenter.bintray.com/com/tencent/bugly/crashreport/3.1.0/crashreport-3.1.0.aar'.
> Remote host closed connection during handshake
> SSL peer shut down incorrectly
感谢以上博文作者的经验分享,谢谢!如有不妥的地方,请评论区留言,本人看到会立刻处理。

本文详细解析了Error:Nosuchproperty:GradleVersion错误的根源,即IDE版本与Gradle版本不匹配的问题,并提供了调整GradlePlugin与Gradle版本的方法,以确保项目的顺利运行。
1064

被折叠的 条评论
为什么被折叠?



