AndroidStudio Gradle版本不匹配问题

时间:2024-04-23 15:33:42

报错信息:  

p.p1 { margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica }

Error:(1, 1) A problem occurred evaluating project ':MemberSDK'.

> Failed to apply plugin [id 'com.android.library']

> Minimum supported Gradle version is 2.14.1.  Current version is 2.4. If using the gradle wrapper, try editing the distributionUrl in /Users/wanglianghe/whaley/heliosAndMoreTvCode/restructureProject/MemberSDKProject/gradle/wrapper/gradle-wrapper.properties to gradle-2.14.1-all.zip

修改方案:

  每个项目都有关于gradle的配置项目录,目录结构:你的项目\gradle\wrapper\gradle-wrapper.properties,然后将gradle-wrapper.properties文件distributionUrl的值改成对应的gradle版本即可。

  比如:distributionUrl= https://services.gradle.org/distributions/gradle-3.0-all.zip