在Android Studio 2.1.3中,实验性gradle无法正常工作吗? [英] In Android Studio 2.1.3 is experimental gradle not working?
问题描述
我有一个项目,在其中混合并匹配常规的Android Gradle插件:
I have a project where I mix and match regular Android Gradle Plugin:
apply plugin: 'com.android.library'
和实验性Gradle插件作为库:
and Experimental Gradle Plugin as a library:
apply plugin: 'com.android.model.library'
在我的总体build.gradle中,我具有以下依赖性:
In my overall build.gradle I have the following dependencies:
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.google.gms:google-services:3.0.0'
classpath 'com.android.tools.build:gradle-experimental:0.7.2'
classpath 'com.android.tools.build:gradle:2.1.3'
}
}
现在升级到Android 2.1.3之后,在Gradle Sync之后我立即收到以下错误消息:
And now after upgrade to Android 2.1.3, I get the following error right after the Gradle Sync:
Gradle同步失败:需要Gradle版本2.10.当前版本> 2.14.1.如果使用gradle包装器,请尝试在?> blah blah blah
Gradle sync failed: Gradle version 2.10 is required. Current version is >2.14.1. If using the gradle wrapper, try editing the distributionUrl in ?>blah blah blah
这时,在.idea Android Studio IDE日志中,我看到以下错误:
At this time In the .idea Android Studio IDE log I see the following error:
原因:org.gradle.api.internal.plugins.PluginApplicationException:>无法应用插件[class>'com.android.build.gradle.model.AndroidComponentModelPlugin']
Caused by: org.gradle.api.internal.plugins.PluginApplicationException: >Failed to apply plugin [class >'com.android.build.gradle.model.AndroidComponentModelPlugin']
修复gradle-wrapper.properties文件时,在Gradle Sync之后会得到以下信息:
When I fix the gradle-wrapper.properties file I get the following after Gradle Sync:
错误:最低支持的Gradle版本是2.14.1.当前版本是> 2.10.如果使用gradle包装器,请尝试将>/Users/development/Desktop/android_msdk/xFAClient/Android/xFA/gradle/wrapp> er/gradle-wrapper.properties中的distributionUrl编辑为gradle-2.14.1-all.zip >
一遍又一遍...
我这里没有头绪...
I have no clue here...
推荐答案
将gradle实验版升级到0.7.3:
Upgrade gradle experimental to 0.7.3:
classpath 'com.android.tools.build:gradle-experimental:0.7.3'
它允许Gradle包装器2.14.1兼容.
It allows gradle wrapper 2.14.1 compatibility.
这篇关于在Android Studio 2.1.3中,实验性gradle无法正常工作吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!