Android Can';不要使用Gradle2.0
我从~/.gradle中删除了与gradle 1.1相关的任何内容,但我有一个错误:Android Can';不要使用Gradle2.0,android,gradle,android-studio,Android,Gradle,Android Studio,我从~/.gradle中删除了与gradle 1.1相关的任何内容,但我有一个错误: 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.proper
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之前):
现在,在文件->设置->渐变中,我有以下内容:
Use local gradle distribution -> /usr/local/gradle/gradle-2.0
安装在该文件夹中,版本为2.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()
}
}
Android Gradle插件目前与Gradle 2.0不兼容。最新的AOSP分支支持2.0,因此Gradle插件的下一版本可能也支持2.0() 我建议切换回包装器并在gradle-wrapper.properties中设置
distributionUrl=http\://services.gradle.org/distributions/gradle-1.12-bin.zip
或者,将本地Gradle版本切换到1.10-1.12
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()
}
}