Phone Gap应用程序:“错误:未找到”www / index.html“的起始页”

问题描述:

我在iPhone上创建了一个基于Phone Gap的应用程序。第一次运行后,我已经拖动我的www文件夹,包含index.html到项目,但仍然在模拟器中得到以下错误:

I have created a Phone Gap based application on iPhone. After the first run, I have dragged my "www" folder, containing "index.html" into the project, but still I am getting the following error in the simulator:


错误:未找到起始页www / index.html。

ERROR: Start Page at 'www/index.html' was not found.

我必须在plist文件或其他地方提及index.html的名称吗?我如何解决这个问题;可以任何一个帮助我吗?提前感谢。

Do I have to mention the name of index.html in a plist file or anywhere else? How can I resolve this; can any one help me? Thanks in advance.

这是PhoneGap和XCode 4之间的不兼容问题。要解决:

It's an incompatibility between PhoneGap and XCode 4. To resolve:


  • 右键点击您的项目,然后选择将文件添加到[project
    name] ...;

  • www 文件夹(其中包含
    ,但未添加为参考);

  • 您必须选择将项目复制到
    目标组的文件夹
    以及
    创建文件夹引用添加任何文件夹

  • right click on your project and choose "Add files to [project name]...";
  • choose the www folder from your curent project's folder (it's included in there, but not added as a reference);
  • when you select the folder, make sure you choose "Copy items into destination group's folder" as well as "Create folder references for any added folders".

注意:如果您选择为任何添加的文件夹创建组在运行时失败。

Note: if you choose "Create groups for any added folders", the app will still fail at runtime.