如何创建离子,科尔多瓦和android的项目吗? [英] how to create project in ionic,cordova and android?

查看:117
本文介绍了如何创建离子,科尔多瓦和android的项目吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经安装离子,科尔多瓦和android。
但离子也没有创造的Andr​​oid项目。
我重视的错误。

I have installed ionic, cordova and android. But ionic is not creating android project. I have attached the error.


C:\\ Users \\用户至尊\\ MyApp的>离子平台添加的android
创建Android项目...
C:\\用户\\ shri.cordova \\ lib目录\\ npm_cache \\科尔多瓦-的Andr​​oid \\ 3.6.3 \\包\\ BIN \\ node_modules \\ Q \\ q.js:126
                    Ë扔掉;
                          ^
错误:ANDROID_HOME没有设置在您的PATHAndroid的命令没有。必须满足这些条件的至少一个。
    在C:\\用户\\ shri.cordova \\ lib目录\\ npm_cache \\科尔多瓦-的Andr​​oid \\ 3.6.3 \\包\\ BIN \\ lib目录\\ check_reqs.js:158:19
    在_fulfilled(C:\\用户\\ shri.cordova \\ lib目录\\ npm_cache \\科尔多瓦-的Andr​​oid \\ 3.6.3 \\包\\ BIN \\ node_modules \\ Q \\ q.js:798:54)
    在self.promiseDispatch.done(C:\\用户\\ shri.cordova \\ lib目录\\ npm_cache \\科尔多瓦-的Andr​​oid \\ 3.6.3 \\包\\ BIN \\ node_modules \\ Q \\ q.js:827:30)
    在Promise.promise.promiseDispatch(C:\\用户\\ shri.cordova \\ lib目录\\ npm_cache \\科尔多瓦-的Andr​​oid \\ 3.6.3 \\包\\ BIN \\ node_modules \\ Q \\ q.js:760:13)
    在C:\\用户\\ shri.cordova \\ lib目录\\ npm_cache \\科尔多瓦-的Andr​​oid \\ 3.6.3 \\包\\ BIN \\ node_modules \\ Q \\ q.js:821:14
    在冲洗(C:\\用户\\ shri.cordova \\ lib目录\\ npm_cache \\科尔多瓦-的Andr​​oid \\ 3.6.3 \\包\\ BIN \\ node_modules \\ Q \\ q.js:108:17)
    在process._tickCallback(node.js的:419:13)
    在Function.Module.runMain(module.js:499:11)
    在启动时(node.js的:119:16)
    在Node.js的:906:3
错误:C:\\用户\\ shri.cordova \\ lib目录\\ npm_cache \\科尔多瓦-的Andr​​oid \\ 3.6.3 \\包\\ BIN \\ create.bat:命令失败,退出code 8
    在ChildProcess.whenDone (C:\\Users\\shri\\AppData\\Roaming\
pm\
ode_modules\\cordova\
ode_modules\\cordova-lib\\src\\cordova\\superspawn.js:135:23)
    在ChildProcess.emit(events.js:98:17)
    在maybeClose(child_process.js:756:16)
    在Process.ChildProcess._handle.onexit(child_process.js:823:5)

推荐答案

您需要包括ANDROID_HOME在路径中。我建议你​​做以下(假设你使用的是Windows 8.1):

You need to include ANDROID_HOME in your PATH. I recommend you do the following (assuming you're on Windows 8.1):

右键单击瓷砖启动器图标在任务栏,并选择系统。在弹出的窗口中,选择高级系统设置在左边。在系统属性窗口中单击环境变量按钮,然后选择添加新的系统变量。对于名称选择ANDROID_HOME和值包含完整路径到你的Andr​​oid SDK目录。

Right click the tile launcher icon in your task bar and choose system. In the window that pops up, choose Advanced system settings on the left. In the System Properties window click the Environment Variables button and choose to add a new system variable. For the name choose ANDROID_HOME and for the value include the full path to your Android SDK directory.

编辑PATH变量并添加以下到值的末尾:

Edit the PATH variable and add the following to the end of the value:

;%ANDROID_HOME%\\工具;%ANDROID_HOME%\\平台工具

重新启动Windows会话,它现在应该工作。

Restart your windows session and it should work now.

这篇关于如何创建离子,科尔多瓦和android的项目吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆