创建机器人子项目过程中出现错误 [英] An error occured during creation of android sub-project

查看:178
本文介绍了创建机器人子项目过程中出现错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我通过安装科尔多瓦ËPhoneGap的 NPM安装-g科尔多瓦 NPM安装-g的PhoneGap 分别。然后,我创建通过HelloWorld应用程序的科尔多瓦创建的HelloWorld mynamespace.helloworld的HelloWorld 。它工作得很好!然后,我改变了我的工作目录的HelloWorld,我试图通过科尔多瓦平台添加的Andr​​oid -d 搭建Android的应用程序,但没有奏效。这里是输出:

I installed cordova e phonegap via npm install -g cordova and npm install -g phonegap respectively. Then i created a HelloWorld application via cordova create HelloWorld mynamespace.helloworld HelloWorld. It worked fine! Then i changed my working directory to HelloWorld and i tried to build the app for android via cordova platform add android -d but it didn't work. here is the output:

Installing cordova library for android...
Requesting {"uri":"https://git-wip-us.apache.org/repos/asf?p=cordova-android.git;a=snapshot;h=3.3.0;sf=tgz"}...
Downloading cordova library for android...
Downloaded, unzipped and extracted 541065 byte response.
Download complete
Installing cordova library for android...
Checking if platform "android" passes minimum requirements...
Creating android project...
Running bin/create for platform "android" with command:     ""C:\Users\marcos.pacheco\.cordova\lib\android\cordova\3.3.0\bin\create"  "C:\Dev\HelloWorld\platforms\android" "mynamespace.helloworld" "HelloWorld"" (output to follow)


C:\Users\marcos.pacheco\AppData\Roaming\npm\node_modules\cordova\node_modules\q\q.js:126
                throw e;
                      ^
Error: An error occured during creation of android sub-project.

at C:\Users\marcos.pacheco\AppData\Roaming\npm\node_modules\cordova\src\platform.js:244:30
at exithandler (child_process.js:633:7)
at ChildProcess.errorhandler (child_process.js:649:5)
at ChildProcess.EventEmitter.emit (events.js:95:17)
at Process.ChildProcess._handle.onexit (child_process.js:787:12)

我GOOGLE了,并发现了一些问题的空格,但我的项目是在C:\开发\ HelloWorld的路径和我的Andr​​oid SDK是在 PATH 等等当我键入​​亚洲开发银行在Windows提示我得到的命令,以及Java和蚂蚁的帮助信息。另外,我有 ANT_HOME JAVA_HOME ANDROID_HOME 设置。我也删除了** .cordova **文件夹我的%HOMEPATH%目录中并重新输入的命令,但错误依然存在。

I've googled and have found some issues with whitespaces but my project is in the C:\Dev\HelloWorld path and my android sdk is in the PATH so that when i type adb at the windows prompt i get the help information of the command as well Java and Ant. Furthermore, i have ANT_HOME, JAVA_HOME and ANDROID_HOME set. I also deleted the ** .cordova ** folder inside my %HOMEPATH% directory and entered the command again but the error is still there.

这可能是错的?

推荐答案

XCOPY需要加以界定,并找到了你的路径,因为它是用于内部的node.js脚本来移动周围的事物。

XCOPY needs to be defined and found on your path as it is used by the internal node.js scripts to move things around.

您可能已经在某处你的机器上XCOPY.EXE。你应该能够的%SystemRoot%\ SYSTEM32 添加到您的PATH,它会工作。或者,你可以打开一个终端,并键入其中XCOPY 看实际路径XCOPY.EXE。

You probably already have xcopy.exe somewhere on your machine. You should be able to add %SystemRoot%\System32 to your PATH and it will work. Or you can open up a terminal and type where xcopy to see the actual path to your xcopy.exe.

我猜的道路上有XCOPY是设置和安装Android的要求,但它会是很好,如果科尔多瓦检查,以确保你有XCOPY的地方...

I guess having XCOPY on the path is a requirement for setting up and installing Android, but it'd be nice if Cordova checked to make sure you have XCOPY somewhere...

这篇关于创建机器人子项目过程中出现错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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