Cordova JQuery Error VS2015:例外:无法调用方法' concat'未定义的

时间:2016-07-28 09:38:33

标签: javascript jquery cordova jquery-mobile visual-studio-2015

当我使用jquery.mobile加载html时,我在VS中收到此错误:

  

例外:无法调用方法' concat'未定义的

     

jquery.mobile-1.4.5js

我遵循了本教程:https://wordpress.org/support/topic/-this-xml-file-does-not-appear-to-have-any-style-information-associated 开始使用jQuery。

这是一个抛出此异常的html示例:

<!DOCTYPE html>
<html>
<head>
    <!--
        Customize the content security policy in the meta tag below as needed. Add 'unsafe-inline' to default-src to enable inline JavaScript.
        For details, see http://go.microsoft.com/fwlink/?LinkID=617521
    -->
    <!--<meta http-equiv="Content-Security-Policy" content="default-src 'self' data: gap: http://api.openweathermap.org https://ssl.gstatic.com 'unsafe-eval'; style-src 'self' 'unsafe-inline'; media-src *">-->

    <meta name="format-detection" content="telephone=no">
    <meta name="msapplication-tap-highlight" content="no">
    <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width">
    <link rel="stylesheet" href="css/jquery.mobile-1.4.5.min.css" />
    <link rel="stylesheet" type="text/css" href="css/bb_Performance_Test_Page.css">
    <title>Performance</title>
</head>
<body>
    <div data-role="header" class="header">
        <h1 id="app-title">Performance</h1>
    </div>

    <button name="bb_prime_Button"
            onClick="bb_prime_Button_Click_Event()">
    Get Prime
    </button>
    <div class="prime">
        noData
    </div>
    <div class="time">
        noData
    </div>

    <script src="scripts/jquery-3.1.0.min.js"></script>
    <script src="scripts/jquery.mobile-1.4.5.min.js"></script>
    <script type="text/javascript" src="cordova.js"></script>
    <script type="text/javascript" src="scripts/platformOverrides.js"></script>
    <script type="text/javascript" src="scripts/bb_Performance_Test_Page.js"></script>

</body>
</html>

我使用的是Visual Studio 2015,一个混合(Cordova)应用项目,JQuery3.1.0和JQuery.mobile.1.4.5

1 个答案:

答案 0 :(得分:3)

jquery.mobile-1.4.5的某些功能与jquery-3.1.0不兼容。使用jquery-2.2.4版本。您可以从这里下载link