簡體   English   中英

未捕獲的ReferenceError:在MobileFirst Migrated應用程序中未定義WL

[英]Uncaught ReferenceError: WL is not defined in MobileFirst Migrated app

我正在將MFP應用程序從V7.1遷移到V8.0。 我運行了遷移工具並創建了cordova項目,然后將代碼從MFP V7.1項目的公共目錄遷移到了新創建的cordova項目的www 我做中提到的變化這一頁。 我在服務器上注冊了我的應用程序,然后執行了mfpdev app pullmfpdev app push然后是cordova准備,然后使用“ mfpdev應用程序預覽”運行了應用程序預覽。 當應用在瀏覽器中打開時,出現以下錯誤:

http://localhost:10081/android/assets/www/worklight/worklight.css Failed to load resource: the server responded with a status of 404 (Not Found)
AuthRealmChallangeProcesser.js:7 Uncaught ReferenceError: WL is not defined
jquery-2.1.1.js:8554 Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check https://xhr.spec.whatwg.org/.
browser-sync-client.2.11.1.js:129 Uncaught TypeError: Cannot read property 'data1469206076574' of null
http://localhost:10081/android/assets/www/cordova.js Failed to load resource: the server responded with a status of 404 (Not Found)_mbs_cordova_sim_load_js @ cordova.js:2198
cordova.js:1186 Channel not fired: onPluginsReady
cordova.js:1186 Channel not fired: onCordovaReady

以下是script標記中index.html文件中引用的文件:

    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="worklight/worklight.css">
    <link rel="stylesheet" href="css/main.css">
    <script type="text/javascript" src="cordova.js"></script>
    <script src="jqueryMobile/jquery-2.1.1.js"></script>
    <script src="https://maps.googleapis.com/maps/api/js?key=mykey"></script>
    <title>My App</title>
    <script src="jqueryMobile/jquery.mobile-1.4.2.js"></script>
    <link rel="apple-touch-icon" href="images/apple-touch-icon.png">
    <link rel="stylesheet" href="css/themes/jBlue/jBlue.css" />
    <link rel="stylesheet" href="css/themes/jBlue/jquery.mobile.icons.min.css">
    <link rel="stylesheet" href="jqueryMobile/jquery.mobile.structure-1.4.2.css" />
    <!-- Uncomment Below for default theme and change data-theme to "a"-->
    <link rel="stylesheet" href="jqueryMobile/jquery.mobile-1.4.2.css" />
    <script src="js/AuthRealmChallangeProcesser.js"></script>

我在服務器上注冊了我的應用程序,然后執行了mfpdev app pull和mfpdev app push

如果要在服務器上進行(拉)並在其他地方使用(推)的現有配置,則僅執行mfpdev app pull/push 它與將Hybrid應用程序遷移到Cordova應用程序無關。

http:// localhost:10081 / android / assets / www / worklight / worklight.css加載資源失敗:服務器響應狀態為404(未找到)

從該錯誤看來,您正在引用一個不存在的文件。 仔細檢查它是否確實存在。

http:// localhost:10081 / android / assets / www / cordova.js無法加載資源:服務器以404(未找到)狀態響應_mbs_cordova_sim_load_js @ cordova.js:2198

您是否也復制了此文件? 你不應該。 您只應在index.html文件中引用它。 科爾多瓦負責這項工作。

您還沒有指定是否執行了其余的其他步驟,例如步驟3.2。 在這里提到: https : //mobilefirstplatform.ibmcloud.com/tutorials/en/foundation/8.0/migration-cookbook/#migrating-applications

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM