我最近将Android Studio更新为1.3.2版。将Android SDK Tools升级到v24.3.4并将Platform-tools升级到v23后,在编译项目时,我收到以下消息:
Error:Gradle 2.4 requires Android Gradle plugin 1.2.0 (or newer) but project
is using version 1.1.0.
Please use Android Gradle plugin 1.2.0 or newer.
我之前的build.gradle文件如下所示:
buildscript {
repositories {
jcenter()
maven { url 'https://maven.fabric.io/public' }
mavenCentral()
}
dependencies {
classpath 'io.fabric.tools:gradle:1.+'
classpath 'com.android.tools.build:gradle:1.1.0-rc3'
classpath 'org.robolectric:robolectric-gradle-plugin:1.0.0'
}
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
apply plugin: 'org.robolectric'
repositories {
jcenter()
mavenCentral()
maven { url 'https://maven.fabric.io/public' }
maven { url "https://repository-achartengine.forge.cloudbees.com/snapshot/" }
maven { url 'https://jitpack.io' }
}
继续并将“com.android.tools.build:gradle:1.1.0-rc3”的类路径更改为“com.android.tools.build:gradle:1.3.0”并收到以下消息:
Error:The Android Gradle plugin 1.3.0 is not supported.
我的gradle / wrapper / gradle-wrapper.properties文件如下所示:
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.4-all.zip
我尝试了许多不同的组合,但未能使其工作,我总是得到“插件xxxx不受支持”错误消息。我在这里错过了什么?任何提示都将不胜感激。
有关插件的一些有用链接: http://mvnrepository.com/artifact/com.android.tools.build/gradle https://developer.android.com/tools/revisions/gradle-plugin.html