错误:无法找到项目目录 - 使用PhoneGap [英] error: project directory could not be found - with PhoneGap
问题描述
我想使用 PhoneGap开发人员应用程式我的项目。我使用以下命令将我的Mac上的PhoneGap版本更新为最新版本:
I want to use the PhoneGap Developer App for my project. I updated my PhoneGap version on my Mac to the newest version with the following command:
sudo npm install -g phonegap
然后我 cd
)并输入命令 phonegap serve
,但我得到的是一个 [错误]项目目录找不到
。当我创建一个全新的项目,比一切工作正常,但为什么我不能使用该开发人员应用程序与我当前的项目?
Then I cd
ed to my project folder (root folder) and entered the command phonegap serve
, but everything I get is an [error] project directory could not be found
. When I create a completely new project, than everything works fine, but why can't I use that Developer App with my current project?
推荐答案
如果项目是使用 cordova
创建的,则最容易使用 phonegap
创建一个新项目,然后复制覆盖现有项目的 www
和 config.xml
。您还必须将插件添加到此新项目,但仍然使用 cordova插件添加
这样做。
If the project was created with cordova
it will be easiest to create a new project with phonegap
and then copy over the www
and config.xml
from the existing project. You will also have to add the plugins to this new project but still use cordova plugin add
to do so.
这篇关于错误:无法找到项目目录 - 使用PhoneGap的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!