您的位置:首页 > 产品设计 > UI/UE

gradle Build Model failure

2015-11-04 16:12 381 查看
FAILURE: Build failed with an exception.

* Where:

Build file 'E:\github\xUtils3-master\library\build.gradle' line: 1

* What went wrong:

A problem occurred evaluating project ':library'.

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

> Gradle version 2.2 is required. Current version is 2.1. If using the gradle wrapper, try editing the distributionUrl in D:\eclipse\gradle\wrapper\gradle-wrapper.properties to gradle-2.2-all.zip

* Try:

Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

查看gradle版本如下:

C:\Users\Administrator>gradle --version

------------------------------------------------------------

Gradle 2.3

------------------------------------------------------------

Build time: 2015-02-16 05:09:33 UTC

Build number: none

Revision: 586be72bf6e3df1ee7676d1f2a3afd9157341274

Groovy: 2.3.9

Ant: Apache Ant(TM) version 1.9.3 compiled on December 23 2013

JVM: 1.8.0_40 (Oracle Corporation 25.40-b25)

OS: Windows 8.1 6.3 amd64

可是在项目的 build.gradle 里 输入

println("I'm now compiling with gradle " + project.gradle.gradleVersion);

打印的是:

I'm now compiling with gradle 2.1

在windows -> preferences ->Gradle 里的 Gradle User Home(.gradle folder location) 自定义 gradle的bin 目录(D:\gradle-2.3\lib)解决问题。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: