Cordova Jquery移动应用程序可以在web浏览器上运行,但当我在android phonegap上构建它时,css并没有显示出来

Cordova Jquery移动应用程序可以在web浏览器上运行,但当我在android phonegap上构建它时,css并没有显示出来,cordova,jquery-mobile,phonegap-build,Cordova,Jquery Mobile,Phonegap Build,Jquery移动应用程序可以在web浏览器上运行,但当我在android phonegap上构建它时,css并没有显示出来 <!DOCTYPE html> <html> <head> <!-- Include meta tag to ensure proper rendering and touch zooming --> <meta name="viewport" content="width=device-width, ini

Jquery移动应用程序可以在web浏览器上运行,但当我在android phonegap上构建它时,css并没有显示出来

<!DOCTYPE html>

<html>
<head>

  <!-- Include meta tag to ensure proper rendering and touch zooming -->
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <!-- Include jQuery Mobile stylesheets -->
  <link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css">
  <!-- Include the jQuery library -->
  <script src="http://code.jquery.com/jquery-1.11.3.min.js"></script>
  <!-- Include the jQuery Mobile library -->
  <script src="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js"></script>
</head>
<body>

<div data-role="page" id="pageone">
  <div data-role="header">
    <h1>Insert Page Title Here</h1>
  </div>

  <div data-role="main" class="ui-content">
    <p>Insert Content Here</p>
  </div>

  <div data-role="footer">
    <h1>Insert Footer Text Here</h1>
  </div>
</div> 

</body>
</html>

**这是一个简单的w3.com代码,当我使用build.phonegap.com制作android应用程序时,css不起作用?

您可能需要说明您使用的phonegap和android的版本。 如果您使用的是PhoneGap 4,则需要将您的远程域列为白名单,例如


有关如何在phonegap for android上构建白名单插件的文档,请参阅。如果网络不稳定或不可用。jQuery移动CSS不起作用。似乎在使用jQuery移动CDN


首先确保网络正常

是否使用code.jquery.com url引用CSS和脚本?CSS和JavaScript应该是我们的projectI-saw应用程序的本地版本,参考code.jquery.com这是一个问题吗?最好有本地版本。如果你的用户在加载时没有数据连接怎么办?我在phonegap.com上构建的只是一个html文件,我编写了它的所有内容,所以我还需要添加一个config.xml文件?是的,你应该有一个配置文件。查看Phone Gap文档。更改了对CDN的所有引用,但它仍然不起作用。最佳做法是从移动设备而不是网络加载资产。您还需要等待DeviceRady事件。见: