2014-11-08 18 views
1

您好我已經在PhoneGap中創建了一個hello世界類型的應用程序。我在www目錄中有index.html,但它顯示的是phonegap的默認主頁。請參閱總是顯示的附件截圖。爲什麼phonegap應用程序總是在覆蓋後顯示自己的默認頁面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重建完成的項目,但仍然一樣。

我不確定發生了什麼問題或缺失。

在此先感謝。

enter image description here

+0

嘗試手動更改在添加的平臺中構建之前的www文件夾內容,然後採取構建並查看它是否工作。 – 2014-11-08 18:40:09

+0

@ ashfaq.p是的,我也在問題中更改了上傳的代碼。 – 2014-11-08 18:44:05

回答

5

我覺得裏面的平臺添加你正在改變WWW文件夾存在。 嘗試在您的項目的根文件夾中存在的www文件夾中進行更改,然後進行構建,它一定會起作用。 檢查此:enter image description here

+0

看到這個https://www.dropbox.com/s/f00yh7up7uygbpb/8.png?dl=0我在這index.html編輯 – 2014-11-08 19:12:07

+1

但你的代碼工作正常我在emmulator以及我的android設備。你可以上傳完整的演示文件夾到保管箱嗎? – 2014-11-08 19:16:27

+0

我看到有平臺文件夾也有那麼android然後platform_www ..我必須添加嗎? – 2014-11-08 19:18:42

相關問題