我无法使用cordova构建android。 我安装了ant,cordova和Android SDK。 我的.bash_profile看起来像:
export PATH="/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin"
export JAVA_HOME=$(/usr/libexec/java_home)
export ANDROID_HOME="/Users/me/adt-bundle/sdk"
export ANT_HOME="/Users/me/apache-ant"
export PATH="$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools:$ANT_HOME/bin"
当我执行cordova build android
时,我收到以下错误:
BUILD FAILED
/Users/cwist/adt-bundle/sdk/tools/ant/build.xml:653: The following error occurred while executing this line:
/Users/cwist/adt-bundle/sdk/tools/ant/build.xml:698: null returned: 1
Total time: 1 second
Error code 1 for command: ant with args: debug,-f,/Users/cwist/Desktop/myApp/platforms/android/build.xml,-Dout.dir=ant-build,-Dgen.absolute.dir=ant-gen
Error: /Users/cwist/Desktop/myApp/platforms/android/cordova/build: Command failed with exit code 2
at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:135:23)
at ChildProcess.emit (events.js:98:17)
at maybeClose (child_process.js:755:16)
at Process.ChildProcess._handle.onexit (child_process.js:822:5)
有人可以帮助我吗?
提前致谢: - )