android - Cordova Android - 构建平台之一时出错 : Error code 1 for command:

标签 android cordova gradle

我的膝上刚刚有了一个 Cordova 项目,我的任务是构建应用程序并将它们转换到商店。 iOS 运行良好,但现在我在 Android 上遇到了瓶颈。

所以,每次我构建 - 通过运行 cordova build android - 我都会收到以下错误:

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':processDebugResources'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Users/sprince/Library/Android/sdk/build-tools/23.0.2/aapt'' finished with non-zero exit value 1

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

BUILD FAILED

Total time: 8.432 secs
ERROR building one of the platforms: Error code 1 for command: /Users/sprince/Documents/Projects/ProjName/platforms/android/gradlew with args: cdvBuildDebug,-b,/Users/sprince/Documents/Projects/ProjName/platforms/android/build.gradle,-Dorg.gradle.daemon=true,-Pandroid.useDeprecatedNdk=true
You may not have the required environment or OS to build this project
Error: Error code 1 for command: /Users/sprince/Documents/Projects/ProjName/platforms/android/gradlew with args: cdvBuildDebug,-b,/Users/sprince/Documents/Projects/ProjName/platforms/android/build.gradle,-Dorg.gradle.daemon=true,-Pandroid.useDeprecatedNdk=true

我一直在谷歌上搜索并通过 Stack 进行了很好的搜索,大多数回复都说进行清理和重建。我已经这样做了几次,但没有成功,我已经检查并安装了所有 SDK/工具等。

有什么想法吗?任何帮助将不胜感激!

最佳答案

我遇到了同样的问题,因为我在创 build 备时删除了 android 安装的 1.5 GB 库。几个星期后,我只是尝试在 android 上运行并显示相同的错误消息。只需打开 avd 并删除所有设备,重新安装您需要测试的设备。

https://developer.android.com/studio/run/managing-avds.html

关于android - Cordova Android - 构建平台之一时出错 : Error code 1 for command:,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35991860/

相关文章:

ios - 在 iframe 中打开选择框时,iPhone 中不显示“完成”按钮

javascript - 更改函数 jquery 中的全局变量值

java - gradle idea 插件 : libraries marked as "unresolved dependencies"

gradle - 如何为Gradle插件创建EarPluginConvention实例?

android - 打开手机并注册时如何获取第一个 Gmail 帐户详细信息

ios - 我可以使用Phonegap实现iTunes/Android支付吗

java - 获取所有音乐文件

android - 为什么一个 Android Studio 项目中有两个 build.gradle 文件?

android - WindowManager 中 View 的 onConfigurationChanged 工作不可靠

android - 扩展 Android 的语音搜索应用