在Mac上构建phonegap android应用程序

时间:2016-03-30 15:07:57

标签: android macos cordova ant

我正在尝试在我的Mac上构建一个phonegap应用程序,我想我在Android设置中有一些错误。当我做phonegap构建android即时收到以下错误

ERROR building one of the platforms: Error code 1 for command: /Users/un/Documents/Github/myapp/platforms/android/gradlew with args: cdvBuildDebug,-b,/Users/un/Documents/Github/myapp/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/un/Documents/Github/myapp/platforms/android/gradlew with args: cdvBuildDebug,-b,/Users/un/Documents/Github/myapp/platforms/android/build.gradle,-Dorg.gradle.daemon=true,-Pandroid.useDeprecatedNdk=true

在我的bash profile.rc中,我添加了

export ANDROID_HOME=/usr/local/opt/android-sdk
export ANT_HOME=/usr/local/Cellar/ant/bin

该应用在iOS中运行良好。

1 个答案:

答案 0 :(得分:0)

尝试删除平台并重新添加

  

cordova平台删除ios

     

cordova平台添加ios

`