這個問題看起來很熟悉這個 Error: ANDROID_HOME is not set and "android" command not in your PATH. You must fulfill at least one of these conditions.科爾多瓦構建Android拋出錯誤在Ubuntu 12.04
但我不能修復它。當我運行
% sudo cordova build android
我收到以下錯誤
Running command: /home/thabung/mobile/hello/platforms/android/cordova/build
[Error: ANDROID_HOME is not set and "android" command not in your PATH. You must fulfill at least one of these conditions.]
ERROR building one of the platforms: Error: /home/thabung/mobile/hello/platforms/android/cordova/build: Command failed with exit code 2
You may not have the required environment or OS to build this project
Error: /home/thabung/mobile/hello/platforms/android/cordova/build: Command failed with exit code 2
at ChildProcess.whenDone (/usr/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:131:23)
at ChildProcess.emit (events.js:98:17)
at maybeClose (child_process.js:766:16)
at Process.ChildProcess._handle.onexit (child_process.js:833:5)
幾件事情我觀察
% echo $ANDROID_HOME
返回我
~/mobile/android-sdk-linux
這是完美的位置 &安卓命令也正常工作。 請幫助.. 我使用的科爾多瓦4.3.0
你爲什麼運行'sudo cordova build android'而不是'cordova build android'? – Trinimon 2015-04-05 19:19:45