问题描述
我在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:
我是否必须在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?
推荐答案
这是PhoneGap与XCode之间的不兼容4.要解决:
It's an incompatibility between PhoneGap and XCode 4. To resolve:
- 右键单击您的项目并选择将文件添加到[project
name] ...; - 从您的curent项目文件夹中选择
www
文件夹(其中包含
,但未添加作为参考); - 当您选择文件夹时,请确保选择将项目复制到
目标组的文件夹以及为
创建文件夹引用任何添加的文件夹。
- right click on your project and choose "Add files to [projectname]...";
- choose the
www
folder from your curent project's folder (it'sincluded in there, but not added as a reference); - when you select the folder, make sure you choose "Copy items intodestination group's folder" as well as "Create folder references forany added folders".
注意:如果选择为任何添加的文件夹创建群组,该应用在运行时仍会失败。
Note: if you choose "Create groups for any added folders", the app will still fail at runtime.
这篇关于PhoneGap应用程序:“错误:找不到`www / index.html`的起始页”&的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!