Gradle version 1.8 is required. Current version is

2019-01-17 14:13发布

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

The link says:

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.+'
    }

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: A problem occurred evaluating project.

Gradle version 1.8 is required. Current version is 1.6

Where can I change the version ?

Thanks in advance :)

10条回答
叼着烟拽天下
2楼-- · 2019-01-17 15:00

I had same problem. Try to remove directory 'gradle' in project directory and then rebuild project. It helped me.

查看更多
啃猪蹄的小仙女
3楼-- · 2019-01-17 15:02

This is a late response, but in case anybody's run into a problem of the gradle version in their ionic project being overwritten by an older one by AS, just remove the android platform from your ionic project and then re-add it. Evidently, installing Gradle is part of that command, so you'll overwrite the overwrite, and get the version you need to run ionic build android from within your Ionic project's root directory.

Although, WARNING: Removing the Android platform, and then re-installing it, might wipe the splashscreens and icons that you'd had in your resources folder. And by "might," I mean that it's happened every time that I've done it (which makes sense, since the resources folder is inside of the android folder that you're removing/re-intalling). Perhaps a more eloquent command line input could reinstall the android platform while leaving the resources folder alone, but, in any case, make sure to copy the directory with your custom splashscreens and icons to a new one before running the re-install.

查看更多
霸刀☆藐视天下
4楼-- · 2019-01-17 15:06

The Android Gradle 0.6.2 plugin that was published on Maven Central. Edit your build.gradle file and instead of depending on "0.6.+", depend on "0.6.1".

查看更多
【Aperson】
5楼-- · 2019-01-17 15:08

The Android Studio ask you for download and install the Gradle version 1.8 for you.

Also the Android Gradle plugin version 0.6.2 has an issue and not works properly.
As said on the official page use the version 0.6.3:

dependencies {
    classpath 'com.android.tools.build:gradle:0.6.3'
}

More info: http://tools.android.com/knownissues

查看更多
登录 后发表回答