我正在嘗試創建一個prgetto Cordova。問題是當我去添加Android平臺時。 此命令後:Cordova添加安卓平臺
cordova add Android platform
我從殼此消息的答案:
Creating Android project ...
/home/francesco/.cordova/lib/android/cordova/3.6.4/bin/node_modules/q/q.js:126
throw e;
^
Error: ANDROID_HOME is not set and "Android" command not in your PATH. You must Fulfill at least one of These conditions.
at /home/francesco/.cordova/lib/android/cordova/3.6.4/bin/lib/check_reqs.js:159:19
at _fulfilled (/home/francesco/.cordova/lib/android/cordova/3.6.4/bin/node_modules/q/q.js:798:54)
at self.promiseDispatch.done (/home/francesco/.cordova/lib/android/cordova/3.6.4/bin/node_modules/q/q.js:827:30)
at Promise.promise.promiseDispatch (/home/francesco/.cordova/lib/android/cordova/3.6.4/bin/node_modules/q/q.js:760:13)
at /home/francesco/.cordova/lib/android/cordova/3.6.4/bin/node_modules/q/q.js:821:14
at flush (/home/francesco/.cordova/lib/android/cordova/3.6.4/bin/node_modules/q/q.js:108:17)
at process._tickCallback (node.js: 415: 13)
at Function.Module.runMain (module.js: 499: 11)
at startup (node.js: 119: 16)
at node.js: 902: 3
Error: /home/francesco/.cordova/lib/android/cordova/3.6.4/bin/create: Command failed with exit code 8
at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:135:23)
at ChildProcess.EventEmitter.emit (events.js: 98: 17)
at maybeClose (child_process.js: 743: 16)
at Process.ChildProcess._handle.onexit (child_process.js: 810: 5)
我環顧四周,但我沒能解決。有人能幫我嗎?有rinngrazio提前。
請參閱我的回答[這裏](http://stackoverflow.com/a/17977487/1775295)關於正確設置環境變量。 – 2015-03-02 15:48:15
我不知道在哪裏添加它。讓我陷入一點麻煩。 – francisco 2015-03-02 16:27:44
添加什麼?如果你不知道如何編輯你的路徑,那麼谷歌,如何編輯路徑。 – 2015-03-02 16:35:50