【发布时间】: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