问题描述
我想创建在 Windows中的Android项目使用科尔多瓦2.2.0(PhoneGap的)。根据这一博客帖子这个命令应该努力 -
I am trying to create an Android project on Windows using Cordova 2.2.0 (PhoneGap). According to this blog post this command should work -
create <project_folder_path> <package_name> <project_name>
不过,我收到一条消息,项目已经存在!。我已经使用了相同的PC上创建,打包和提交一个Android应用程序,所以我知道我有Java的,javac的,蚂蚁,机器人等安装。
But I am getting a message "Project already exists!". I have used the same PC to create, package and submit an Android app so I know I have Java, Javac, Ant, Android e.t.c. installed.
我也试过这种在Mac上与科尔多瓦2.1.0在那里我得到的消息时发生错误。删除的项目。
I have also tried this on a Mac with Cordova 2.1.0 and there I get the message "An error occurred. Deleting project.."
能否请你说明什么可能是这个错误的原因和可能的解决?
Could you please suggest what might be the cause of this error and a possible fix?
感谢。
更新
这个问题似乎是固定的科尔多瓦2.2.0,但我还没有找到一个解决方法2.1.0
This problem seems to be fixed in Cordova 2.2.0 but I haven't found a workaround for 2.1.0
推荐答案
需要明确的是,你的目标项目路径应该是要创建的项目,然后最后的目录将是什么要创建。例如:
To be clear, your target project path should be to be where you want the project to be created and then the last directory will be what you want to be created. For example:
./create ./test2 com.mytest MyTest
在这种情况下,你想创建一个名为test2的新文件夹的当前目录中的项目,并在此文件夹还没有被创建(当它运行它会创建)。
In this case you want to create a project in the current directory in a new folder called "test2" and this folder has not been created yet (it will be created when this is run).
更新:如果您使用的是verison科尔多瓦边缘或更高,我强烈建议你使用的科尔多瓦CLI工具在这里的一个较新:的
UPDATE: If you are using a newer verison of the Cordova Edge or greater, i highly recommend using the Cordova CLI Utility here: http://cordova.apache.org/docs/en/edge/guide_cli_index.md.html#The%20Command-Line%20Interface
这篇关于科尔多瓦2.1.0(PhoneGap的)为Android打造剧本说:&QUOT;项目已经存在&QUOT;或QUOT;发生错误。删除项目&QUOT;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!