2016-07-22 8 views
0

Ich bin dabei, die MFP-App von V7.1 auf V8.0 zu migrieren. Ich lief das Migrationstool und es erstellt das Cordova-Projekt, und dann habe ich meinen Code von gemeinsamen Verzeichnis von MFP V7.1 Projekt auf die www von neu erstellten Cordova Projekt migriert. Ich habe die Änderungen in this Seite erwähnt. Ich habe meine App auf dem Server registriert und habe dann mfpdev app pull und mfpdev app push dann cordova vorbereitet und dann habe ich die App-Vorschau mit 'mfpdev app preview' ausgeführt. Wenn die App auf dem Browser öffnet, bin ich unten Fehler bekommen:Uncaught ReferenceError: WL ist nicht in MobileFirst Migrated-App definiert

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 

Folgenden sind die Dateien, die in der Script-Tag in der Datei index.html verwiesen werden immer:

<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> 

Antwort

1

I register my app on the server and then did mfpdev app pull and mfpdev app push

Sie tun nur mfpdev app pull/push, wenn Sie eine vorhandene Konfiguration auf dem Server haben, die Sie (ziehen) und an anderer Stelle (push) verwenden möchten. Es hat nichts damit zu tun, Ihre Hybrid-Anwendung in eine Cordova-Anwendung zu migrieren.

http://localhost:10081/android/assets/www/worklight/worklight.css Failed to load resource: the server responded with a status of 404 (Not Found)

Aus dem Fehler sieht es so aus, als ob Sie auf eine nicht vorhandene Datei verweisen. Überprüfen Sie, dass es tatsächlich da ist.

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

Haben Sie diese Datei auch kopiert? Du solltest nicht. Sie sollten nur in der Datei index.html darauf verweisen. Cordova kümmert sich darum.

Sie haben auch nicht angegeben, ob Sie die zusätzlichen verbleibenden Schritte wie Schritt 3.2 befolgt haben. erwähnt hier: https://mobilefirstplatform.ibmcloud.com/tutorials/en/foundation/8.0/migration-cookbook/#migrating-applications

Verwandte Themen