gradle Build Model failure

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)解决问题。



  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值