Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/217.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 为什么phonegap应用程序总是在覆盖index.html后显示自己的默认页面_Android_Html_Cordova - Fatal编程技术网

Android 为什么phonegap应用程序总是在覆盖index.html后显示自己的默认页面

Android 为什么phonegap应用程序总是在覆盖index.html后显示自己的默认页面,android,html,cordova,Android,Html,Cordova,嗨,我在PhoneGap中做了一个hello world类型的应用程序。我在www目录中有index.html,但它显示了phonegap的默认主页。请参阅附加的屏幕截图,它总是显示 index.html <html> <head> <meta charset="utf-8" /> <meta name="format-detection" content="telephone=no" />

嗨,我在PhoneGap中做了一个hello world类型的应用程序。我在www目录中有index.html,但它显示了phonegap的默认主页。请参阅附加的屏幕截图,它总是显示

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重建完整的项目,但仍然一样

我不确定哪里出了问题或遗漏了什么

提前谢谢


我认为您正在对添加的平台中的www文件夹进行更改。 尝试在项目根文件夹中的www文件夹中进行更改,然后进行构建,它肯定会工作。
选中此项:

在您添加的平台上进行构建之前,尝试手动更改www文件夹内容,然后进行构建,看看它是否有效。@ashfaq.p是的,我在问题中也更改并上载了代码。请参阅我在此索引中编辑的内容。htmlb但您的代码在Emulator以及我的android设备上对我来说都很好。你能把你完整的演示文件夹上传到dropbox吗?我看到还有平台文件夹,然后是android,然后是平台www。。我必须添加吗?不,不要更改平台内部的任何内容。当您使用根www文件夹中所做的所有更改进行生成时,它会自动更新。