在Windows 7上安装cordova 3.5.0时,列出Android目标时出现错误



在phonegap docs(http://cordova.apache.org/docs/en/3.5.0//guide_cli_index.md.html)的帮助下,我成功安装了node.js、git客户端和cordova 3.5.0。我也可以安装windows8和wp8。但是当安装android时,我得到以下错误:

C:Usersrajkiranbhello>cordova platform add android
Creating android project...
C:Usersrajkiranb.cordovalibandroidcordova3.5.0binnode_modulesqq.js:12
6
                    throw e;
                          ^
Error: An error occurred while listing Android targets
    at C:Usersrajkiranb.cordovalibandroidcordova3.5.0binlibcheck_reqs.
js:87:29
    at _rejected (C:Usersrajkiranb.cordovalibandroidcordova3.5.0binnode
_modulesqq.js:808:24)
    at C:Usersrajkiranb.cordovalibandroidcordova3.5.0binnode_modulesq
q.js:834:30
    at Promise.when (C:Usersrajkiranb.cordovalibandroidcordova3.5.0binn
ode_modulesqq.js:1079:31)
    at Promise.promise.promiseDispatch (C:Usersrajkiranb.cordovalibandroid
cordova3.5.0binnode_modulesqq.js:752:41)
    at C:Usersrajkiranb.cordovalibandroidcordova3.5.0binnode_modulesq
q.js:574:44
    at flush (C:Usersrajkiranb.cordovalibandroidcordova3.5.0binnode_mod
ulesqq.js:108:17)
    at process._tickCallback (node.js:419:13)
Error: C:Usersrajkiranb.cordovalibandroidcordova3.5.0bincreate.bat: Com
mand failed with exit code 8
    at ChildProcess.whenDone (C:UsersrajkiranbAppDataRoamingnpmnode_module
scordovanode_modulescordova-libsrccordovasuperspawn.js:135:23)
    at ChildProcess.emit (events.js:98:17)
    at maybeClose (child_process.js:756:16)
    at Process.ChildProcess._handle.onexit (child_process.js:823:5)

在Computer -> C ->环境变量中。在用户变量和系统变量中,增加了ANT。

ANT_HOME = C:Program Files (x86)WinAnt

可惜运气不好。

请帮帮我。

直接添加到路径变量

C: android用户 rajkiranb adt - bundle - windows - x86_64 - 20140321 sdk平台工具‌;C: android用户 rajkiranb adt - bundle - windows - x86_64 - 20140321

sdk 工具

第二个是tools而不是build-tools

检查ANDROID_HOME系统变量是否设置为android sdk位置

相关内容

  • 没有找到相关文章

最新更新