简体   繁体   English

chrome移动应用由于gradle版本而失败

[英]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.

相关问题 在将Gradle版本升级到2.3.3时,构建失败并显示app:transformClassesAndResourcesWithProguardForRelease - Build fails with app:transformClassesAndResourcesWithProguardForRelease on upgrading gradle version to 2.3.3 Gradle无法构建应用 - Gradle fails to build app 由于棉绒和木材,Gradle 清洁失败 - Gradle clean fails because of lint & timber 由于错误的 gradle 版本而导致构建失败时安装 gradle 包装器 - install gradle wrapper when build failes because of wrong gradle version Flutter android 构建失败,并显示“任务 ':app:processReleaseResources' 执行失败”。 更改 gradle 构建工具版本后 - Flutter android build fails with "Execution failed for task ':app:processReleaseResources'." after changing gradle build tools version Appium显示错误“未知错误:Chrome版本必须> = 31.0.1650.59 \\ n,即使Android移动应用中的Chrome版本更高 - Appium showing error "unknown error: Chrome version must be >= 31.0.1650.59\n even though the chrome version is higher in the Android mobile app gradle 说因为找不到所有文件而无法构建? - gradle says it fails to build because it couldnt find all files? 在移动Chrome上上传图片表单失败 - Upload Picture Form Fails On Mobile Chrome 移动Chrome应用和mediaGalleries API - Mobile Chrome App and mediaGalleries API 发行更新的移动应用程序版本 - Releasing updated mobile app version
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM