Cordova在ubuntu中构建问题

时间:2015-04-01 02:13:53

标签: android cordova ubuntu

我正在关注教程@ http://www.gaggl.com/2014/04/apache-cordova-development-environment-install-on-ubuntu/

Cordova构建失败并显示消息:

:〜/ projects / Hello $ sudo cordova build

Running command: /home/skn/projects/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/skn/projects/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/skn/projects/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)

我也将android包含在路径变量中。

skn@bangre:~/projects/Hello$ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/bin/java:/usr/bin/ant:.:/home/skn/android-sdk-linux/tools:/home/skn/android-sdk-linux/platform-tools

从下面的屏幕截图中,您可以看到已安装sdk enter image description here

我还有以下检查通过。

skn@bangre:~/.cordova/lib/npm_cache/cordova-android/3.7.1/package/bin$ ./android_sdk_version 
 21

skn@bangre:~/.cordova/lib/npm_cache/cordova-android/3.7.1/package/bin$ ./check_reqs 
Looks like your environment fully supports cordova-android development!

请帮我指出这个问题。

0 个答案:

没有答案