【问题标题】:Cordova/PhoneGap - Build failed Error code 1 for commandCordova/PhoneGap - 构建失败命令的错误代码 1
【发布时间】:2016-09-10 20:01:00
【问题描述】:

我正在做一个科尔多瓦应用程序。 iOS 运行良好。但是今天,我在Android上试用了它。 当我运行命令时:cordova build android 我构建失败了:

* Where:
Build file '/Users/guillaume/Desktop/fcm/platforms/android/build.gradle' line: 22

* What went wrong:
A problem occurred evaluating root project 'android'.
> Failed to apply plugin [id 'android']
   > Gradle version 2.10 is required. Current version is 2.2.1. If using the gradle wrapper, try editing the distributionUrl in /Users/guillaume/Desktop/fcm/gradle/wrapper/gradle-wrapper.properties to gradle-2.10-all.zip

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED


Error: Error code 1 for command: /Users/guillaume/Desktop/fcm/platforms/android/gradlew with args: cdvBuildDebug,-b,/Users/guillaume/Desktop/fcm/platforms/android/build.gradle,-Dorg.gradle.daemon=true,-Pandroid.useDeprecatedNdk=true

我试着按照它所说的去做:改变fcm/gradle/wrapper/gradle-wrapper.properties to gradle-2.10-all.zip 事实上,在我的 cordova 文件夹(名为 fcm)中,我没有 gradle 文件夹。

更新: 我不得不告诉你,我在config.xml中更改了包名。 在此之前,在 Android 中构建是可以的,但我无法运行 APK,因为它是使用已使用的包签名的。

我该怎么办?

【问题讨论】:

标签: android ios cordova android-gradle-plugin phonegap-build


【解决方案1】:

尝试删除平台android并在构建之前重新添加它。我可能会为你们中的一些人工作。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2014-03-07
    • 1970-01-01
    • 2014-09-08
    • 2019-12-04
    • 2017-05-15
    • 2017-01-18
    • 1970-01-01
    • 2017-12-18
    相关资源
    最近更新 更多