在Windows 7安装的PhoneGap:命令'机器人'失败 [英] Installing Phonegap on Windows 7 : The command 'android' failed
问题描述
我跟着文档和PhoneGap的一些教程,在Windows 7上安装它,但我坚持。
I followed the documentation and some tutorials on Phonegap to install it on Windows 7, but I'm stuck.
到目前为止,我已经安装了Java 1.7.0_06,蚂蚁的Apache 1.9.2,Eclipse中的Android SDK与Android 4.3(API 18),所有的工具和SDK管理器中的所有附加功能),NodeJS 0.10.18和Git的。
So far, I've installed Java 1.7.0_06, Ant-Apache 1.9.2, Eclipse, Android SDK with Android 4.3 (API 18), all Tools and all Extras in the SDK Manager), NodeJS 0.10.18 and Git.
我写的所有路径在PATH变量在Windows中它看起来像这样(分解):
I wrote all paths in the PATH variables in Windows it's look like this (decomposed) :
F:\nodejs;
F:\android-sdk\sdk\platform-tools;
F:\android-sdk\sdk\tools;
%JAVA_HOME%\bin;
%ANT_HOME%\bin;
C:\Program Files (x86)\Git\bin
在哪里%JAVA_HOME%和%ANT_HOME%的人在正确的道路,他们给了我自己的版本,当我键入CLI Java的版本或蚂蚁 - 版本
Where %JAVA_HOME% and %ANT_HOME% have the right path, they give me the their version when I type java -version or ant -version in the CLI
于是我就在CLI中,我用下面的命令安装PhoneGap的:
So I went in the CLI, I installed Phonegap with the following command :
npm install -g phonegap
当我输入的PhoneGap -v这给我3.0.0-0.14.3版本。
It give me the 3.0.0-0.14.3 version when I type phonegap -v.
现在,我去了我的文件夹F:\ apps中,我创建了下面的命令一个新的项目:
Now, I went to my folder F:\apps and I created a new project with the following command :
phonegap create hello com.example.hello HelloWorld
一切顺利的话,将创建的文件。
Everything goes well, the files are created.
我去了'你好'的文件夹,我输入以下命令:
I went in the 'hello' folder, and I typed this command :
phonegap local build android
和那边来的问题,我得到这个错误:
And there come the problem, I get this error :
[phonegap] adding the Android platform...
[error] The command `android` failed. Make sure you have the latest AndroidSDK installed, and the `android` command (inside the tools/ folder) added to your path. Output:
我想这个命令也:
I tried this command too :
phonegap build android
但它会卡在这,没有发生下一个:
But it get stuck at this, nothing happen next :
[phonegap] detecting Android SDK environment...
[phonegap] using the remote environment
[phonegap] compressing the app...
在很多的研究,我不知道我能做些什么了发现问题,我安静的新的这一切命令行...所以是的,你有什么想法,为什么命令'机器人'失败了吗?
After lot's of research, I don't know what I can do anymore to find the problem, and I'm quiet new with all this CLI... So yeah, do you have any idea why the command 'android' failed ?
感谢
推荐答案
开放的环境变量,在第一部分用户变量这个名字Android和变量f添加新的变量:\ Android的SDK \ SDK \工具;
Open environment variables, on the first part 'user variables' add new variable with this name android and the variable F:\android-sdk\sdk\tools;
然后编辑用户变量PATH和在线路%的android%末尾添加这一点; 关闭CMD,然后重试。
Then edit the user variables PATH and add this at end of the line %android%; close your CMD and try again.
这篇关于在Windows 7安装的PhoneGap:命令'机器人'失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!