0

我正在使用英特尔 xdk 制作应用程序。它适用于许多设备,但是当我尝试使用 android 3.1 的平板电脑时,它不起作用。不显示面板的标题,也不会触发 $.ui.ready。即使尝试使用这个简单的代码,它也会失败(也不显示 hello world 按钮):

<!DOCTYPE html>
<html><!--HTML5 doctype-->

<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta http-equiv="Pragma" content="no-cache">
<script type="text/javascript" charset="utf-8" src="intelxdk.js"></script>
<script type="text/javascript" language="javascript">
    var isIntel=window.intel&&window.intel.xdk
    // This event handler is fired once the intel libraries are ready
    function onDeviceReady() {
        //hide splash screen now that our app is ready to run
        intel.xdk.device.hideSplashScreen();
        setTimeout(function () {
            $.ui.launch();
        }, 50);
    }
    //initial event handler to detect when intel is ready to roll
    document.addEventListener("intel.xdk.device.ready", onDeviceReady, false);
</script>
<script src="js/appframework.ui.min.js"></script>
<script>
    if(isIntel)
        $.ui.autoLaunch = false;
    $.ui.useOSThemes = false; //Change this to false to force a device theme
    $.ui.blockPageScroll();
    $(document).ready(function () {
        if ($.ui.useOSThemes && (!$.os.ios||$.os.ios7))
            $("#afui").removeClass("ios");
    });

    $.ui.ready(function(){
        alert('uiready');
    //App is ready lets check if a user exists.


});
</script>
<link href="css/icons.css" rel="stylesheet" type="text/css">
<link href="css/af.ui.css" rel="stylesheet" type="text/css">
</head>
<body>
<div id="afui" class="ios">
    <div id="header" class="header"></div>
    <div id="content" style="">
        <div class="panel" title="Main" id="main" selected="selected"
        style="">
            <a class="button" href="#" style="" data-appbuilder-object="button">Hello World</a>
        </div>
    </div>
    <div id="navbar" class="footer">
        <a href="#main" class="icon home">Home</a>
    </div>




</div>
</body>


</html>

有任何想法吗?

4

1 回答 1

0

检查标题数据中的 text/html 内容编码。Content-Encoding: gzip这样做是行不通的。也许.htaccess => Modul mod_filter.c

于 2015-02-24T22:54:42.410 回答