yzc261亚洲城官网备用地址cordova build android 报错 ANDROID_HOME is not set

( yzc261亚洲城官网备用地址 )

运行

$cordova build android
[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: /Users/albert/Bloom/BloomateStore/platforms/android/cordova/build: Command failed with exit code 2
You may not have the required environment or OS to build this project
Error: /Users/albert/Bloom/BloomateStore/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.EventEmitter.emit events.js:98:17
    at maybeClose child_process.js:735:16
    at Process.ChildProcess._handle.onexit child_process.js:802:5

请问这个ANDROID_HOME应该如何设置,在网上找了一圈,都没有解决这个问题
PS:
OSX系统 build ios 成功了
android 之前 build 成功过 现在则一直报这个错,不知道是动了哪里了

ANDROID_HOME是环境变量,指向你的Android SDK目录如果是windows的话直接设置即可。
*nix/OSX 使用.bashrc export一下。

在环境变量里面配置,变量名为ANDROID_HOME,变量值为你安装android-sdk的地址,你也可以参考http://www.ifcoder.us/看看

(看完/读完)这篇文章有何感想! yzc261亚洲城官网备用地址的分享…

发表评论

电子邮件地址不会被公开。 必填项已用*标注