用户登录
用户注册

分享至

需要 Gradle 版本 1.8.当前版本是 1.6

  • 作者: 哦合11
  • 来源: 51数据库
  • 2022-12-30

问题描述

有一个新的 Android Studio 更新:https://sites.google.com/a/android.com/tools/recent/androidstudio030released

There is a new Android Studio update: https://sites.google.com/a/android.com/tools/recent/androidstudio030released

链接说:

Gradle 1.8 和Android Gradle 插件版本 0.6.+

The improved performance is made possible by changes in Gradle 1.8 and Android Gradle plugin version 0.6.+

所以我像这样更改了我的依赖项:

So I changed my dependencies like this:

buildscript {
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:0.6.+'
    }

但我不知道在哪里可以将 Gradle 1.6 更改为 1.8 ...

But I don't know where I can change the Gradle 1.6 to 1.8 ...

当我编译应用程序时,我遇到了这个错误:

And when I compile the app I've got this error:

Gradle:评估项目时出现问题.

Gradle: A problem occurred evaluating project.

需要 Gradle 版本 1.8.当前版本是 1.6

Gradle version 1.8 is required. Current version is 1.6

在哪里可以更改版本?

提前致谢:)

推荐答案

我不确定这是否会对你有所帮助,但这是为我解决的问题:

I am not sure if this will help you but here is what fixed it for me:

在你的项目中打开这个文件:

Open up this file in your project:

<项目>/gradle/wrapper/gradle-wrapper.properties

编辑 distributionUrl 行并设置它:

Edit the distributionUrl line and set it too:

distributionUrl=http://www.51sjk.com/Upload/Articles/1/0/340/340458_20221230115636133.zip

重建您的项目.

更新:您现在可能想使用 gradle-2.8-all.zip.

Update: You might want to use gradle-2.8-all.zip now.

软件
前端设计
程序设计
Java相关