[英]chrome mobile app fails because of gradle version
I am fairly new to using cca for complex things and all my attempts fail with this error: 对于将cca用于复杂的事情,我是一个新手,而我的所有尝试均因此错误而失败:
FAILURE: Build failed with an exception. 失败:构建失败,发生异常。
Where: Build file '/home/peterj/Documents/Projects/ChromeMobileApps/t2/platforms/android/build.gradle' line: 27 其中:构建文件“ /home/peterj/Documents/Projects/ChromeMobileApps/t2/platforms/android/build.gradle”行:27
What went wrong: A problem occurred evaluating root project 'android'. 出了什么问题:评估根项目“ android”时发生问题。
Failed to apply plugin [id 'android'] Gradle version 1.10 is required.
无法应用插件[id'android'] Gradle版本1.10。 Current version is 2.2.1.
当前版本是2.2.1。 If using the gradle wrapper, try editing the distributionUrl in /home/peterj/Documents/Projects/ChromeMobileApps/t2/gradle/wrapper/gradle-wrapper.properties to gradle-1.10-all.zip
如果使用gradle包装器,请尝试将/home/peterj/Documents/Projects/ChromeMobileApps/t2/gradle/wrapper/gradle-wrapper.properties中的distributionUrl编辑为gradle-1.10-all.zip
I don't really know when did gradle updated but this is what I have installed with android: 我真的不知道gradle什么时候更新的,但这是我用android安装的:
Android SDK tools - 24 Android SDK工具-24
Android SDK platform tools 21 Android SDK平台工具21
Android SDK build tools 19 (I have also tried with 21.1.1 - same error) Android SDK构建工具19(我也尝试使用21.1.1-相同的错误)
API 19 - SDK platform. API 19-SDK平台。
I do not see any way to downgrade the tools and plarform tools and I have also upgraded cordova and cca (with npm). 我看不到任何降级工具和Plarform工具的方法,我还升级了cordova和cca(使用npm)。
Am I missing something? 我想念什么吗?
Updated build.gradle file 更新了build.gradle文件
https://git-wip-us.apache.org/repos/asf?p=cordova-android.git;a=blob_plain;f=bin/templates/project/build.gradle;hb=f953e6a https://git-wip-us.apache.org/repos/asf?p=cordova-android.git;a=blob_plain;f=bin/templates/project/build.gradle;hb=f953e6a
buildscript {
repositories {
mavenCentral()
}
// Switch the Android Gradle plugin version requirement depending on the
// installed version of Gradle. This dependency is documented at
// http://tools.android.com/tech-docs/new-build-system/version-compatibility
// and https://issues.apache.org/jira/browse/CB-8143
if (gradle.gradleVersion >= "2.1") {
dependencies {
classpath 'com.android.tools.build:gradle:0.14.0+'
}
} else {
dependencies {
classpath 'com.android.tools.build:gradle:0.12.0+'
}
}
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.