Cordova 2.1.0 (PhoneGap) 为 Android 创建脚本显示“项目已经存在";或“发生错误.正在删除项目" [英] Cordova 2.1.0 (PhoneGap) create script for Android says "Project already exists" or "An error occurred. Deleting project"

查看:14
本文介绍了Cordova 2.1.0 (PhoneGap) 为 Android 创建脚本显示“项目已经存在";或“发生错误.正在删除项目"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用 Cordova 2.2.0 (PhoneGap) 在 Windows 上创建一个 Android 项目.根据这个博客文章这个命令应该工作 -

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、Ant、Android 等.已安装.

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.

我也在装有 Cordova 2.1.0 的 Mac 上尝试过此操作,但收到消息发生错误.正在删除项目.."

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?

谢谢.

更新

这个问题似乎在 Cordova 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

推荐答案

要清楚,你的目标项目路径应该是你想要创建项目的地方,然后最后一个目录是what 你想被创造.例如:

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).

更新:如果您使用的是 Cordova Edge 的更新版本或更高版本,我强烈建议您在此处使用 Cordova CLI 实用程序:http://cordova.apache.org/docs/en/edge/guide_cli_index.md.html#The%20命令行%20接口

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

这篇关于Cordova 2.1.0 (PhoneGap) 为 Android 创建脚本显示“项目已经存在";或“发生错误.正在删除项目"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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