如何降级到旧版本的 Gradle [英] How to downgrade to older version of Gradle

查看:75
本文介绍了如何降级到旧版本的 Gradle的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的 .gradle 文件夹中有一个 2.4 文件夹,它是 gradle 的版本.我想降级到 2.2.1,因为我需要使用 Gradle 插件 1.0.1.我已经尝试通过以下方式更改:

I have in my .gradle folder, a 2.4 folder which is the version of gradle. I want to downgrade to 2.2.1, because I need to use Gradle plugin 1.0.1. I already try to change by:

distributionUrl=https://services.gradle.org/distributions/gradle-2.2.1-all.zip

distributionUrl=https://services.gradle.org/distributions/gradle-2.2.1-all.zip

但这并没有解决问题,我仍然使用 2.4 版本.

But this did not solve the issue and I'm still with 2.4 version.

我该如何解决这个问题?

How can I solve this?

推荐答案

在项目设置中更改您的 gradle 版本:如果你使用的是mac,点击文件->项目结构,然后更改gradle版本,这里:

Change your gradle version in project setting: If you are using mac,click File->Project structure,then change gradle version,here:

并检查您的项目build.gradle,更改gradle的依赖项,如下所示:

And check your build.gradle of project,change dependency of gradle,like this:

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:1.0.1'
    }
}

这篇关于如何降级到旧版本的 Gradle的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆