2014-09-03 77 views
0

我刪除,以從搖籃〜/ .gradle 1.1相關的任何東西,但我有一個錯誤:不能使用搖籃2.0

Error:Gradle version 1.10 is required. Current version is 2.0. If using the gradle wrapper, try editing the distributionUrl in /home/alex/Documents/projects/android/MyApp/gradle/wrapper/gradle-wrapper.properties to gradle-1.10-all.zip. 

我的設置是(之前我已經刪除從項目/ gradle這個):

distributionUrl=http\://services.gradle.org/distributions/gradle-2.0-all.zip 
在文件 -

現在>設置 - >搖籃我有這樣的:其安裝文件夾中,有2個版本

Use local gradle distribution -> /usr/local/gradle/gradle-2.0 

。 0。

那有什麼問題呢?

這裏是build.gradle

apply plugin: 'scala' 

buildscript { 
    repositories { 
     jcenter() 
     mavenCentral() 
     maven { 
      url "http://saturday06.github.io/gradle-android-scala-plugin/repository/snapshot" 
     } 
    } 
    dependencies { 
     classpath 'com.android.tools.build:gradle:0.12.2' 
     classpath "jp.leafytree.gradle:gradle-android-scala-plugin:1.0-SNAPSHOT" 

    } 
} 

allprojects { 
    repositories { 
     jcenter() 
     mavenCentral() 
    } 
} 

回答

1

Android的搖籃插件目前不搖籃2.0兼容。最新的AOSP分支支持2.0,所以Gradle插件的下一個版本很可能也會支持2.0(source)。

我建議切換回包裝並在您的gradle-wrapper.properties中設置distributionUrl=http\://services.gradle.org/distributions/gradle-1.12-bin.zip

或者,將您的本地Gradle版本切換到1.10-1.12。