为什么phonegap应用程序总是在覆盖index.html后显示自己的默认页面 [英] Why phonegap application always shows own default page after override index.html

查看:183
本文介绍了为什么phonegap应用程序总是在覆盖index.html后显示自己的默认页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hi我在PhoneGap中做了一个hello world类型的应用程序。我在 www 目录中有index.html,但它显示的是phonegap的默认主页。

Hi I have made a hello world type of application in PhoneGap. I have index.html in www directory but it is displaying something default home page of phonegap. Please see attached screenshot that it is displaying always.

index.html

index.html

<html>
    <head>
        <meta charset="utf-8" />
        <meta name="format-detection" content="telephone=no" />
        <meta name="msapplication-tap-highlight" content="no" />
        <!-- WARNING: for iOS 7, remove the width=device-width and height=device-height attributes. See https://issues.apache.org/jira/browse/CB-4323 -->
        <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi" />
        <link rel="stylesheet" type="text/css" href="css/index.css" />
        <title>Hello World</title>
    </head>
    <body>
        <script type="text/javascript" src="cordova.js"></script>
        <script type="text/javascript" src="js/index.js"></script>
        <script type="text/javascript">
            app.initialize();
        </script>

        <form>
            Select your favourite color: <input type="color" name="favcolor">
            <br/>
            <input type="button" value="SUBMIT" />
        </form>

    </body>
</html>

但是当我在Android手机上运行应用程序时总是显示这个。我已经完成3-4重建完成项目,但仍然相同。

But when I run the app in android phone it always display this. I have done 3-4 rebuild complete project but still same.

我不知道是什么错误或缺少。

I am not sure what is going wrong or missing.

提前感谢。

推荐答案

我想你正在修改www文件夹里面的平台添加。
尝试在您的项目的根文件夹中的www文件夹中进行更改,然后进行构建,它一定会工作。
检查:

I think you are making changes to www folder present inside the platforms added. Try to make changes in the www folder which is present in the root folder of your project and then take a build and it will definitely work. Check This:

这篇关于为什么phonegap应用程序总是在覆盖index.html后显示自己的默认页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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