CLI を使用してビルドする場合、すべて正常に動作しているように見えますが、コンソールでプレビューを確認すると、不足しているファイルがいくつかあることがわかります。コンソール出力は次のとおりです。
アンドロイド:
Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check http://xhr.spec.whatwg.org/.
GET http://localhost:10080/MyProject/apps/services/preview/MyApp/android/1.0/default/cordova/cordovasim.js 404 (Not Found)_mbs_cordova_sim_load_js @ cordova.js:21(anonymous function) @ cordova.js:53
worklight.js:5138 Uncaught Exception: Uncaught ReferenceError: cordova is not defined at (compiled_code):16156WL.Logger.__log @ worklight.js:5138WL.Logger.$.each.PUBLIC_API.(anonymous function) @ worklight.js:5520WL.Logger.window.onerror @ worklight.js:5478
worklight.js:16156 Uncaught ReferenceError: cordova is not defined(anonymous function) @ worklight.js:16156
worklight.js:5134 Initialization option 'connectOnStartup' is deprecated. Use WL.Client.connect() to connect to the IBM MobileFirst Platform Server.
worklight.js:5134 wlclient init started
dependencies.js:10 WL not defined ReferenceError: cordova is not defined
at klass.WL.BusyIndicator.WLJSX.Class.create.show (http://localhost:10080/MyProject/apps/services/preview/MyApp/android/1.0/default/worklight/worklight.js:12157:6)
at __showBusy (http://localhost:10080/MyProject/apps/services/preview/MyApp/android/1.0/default/worklight/worklight.js:7345:18)
at onEnvInit (http://localhost:10080/MyProject/apps/services/preview/MyApp/android/1.0/default/worklight/worklight.js:7660:14)
at init (http://localhost:10080/MyProject/apps/services/preview/MyApp/android/1.0/default/worklight/worklight.js:8128:4)
at http://localhost:10080/MyProject/apps/services/preview/MyApp/android/1.0/default/assets/js/dependencies.js:10:990(anonymous function) @ dependencies.js:10
angular-libs.js:8 [10:40:49]MyApp.home.controller :: [INFO] Welcome to MyApp
iPhone:
http://localhost:10080/MyProject/apps/services/preview/MyApp/iphone/1.0/default/worklight/cordova.js Failed to load resource: the server responded with a status of 404 (Not Found)_mbs_cordova_sim_load_js @ cordova.js:21
cordova.js:26 Uncaught ReferenceError: cordova is not defined
worklight.js:5134 Initialization option 'connectOnStartup' is deprecated. Use WL.Client.connect() to connect to the IBM MobileFirst Platform Server.
worklight.js:5134 wlclient init started
worklight.js:5134 Request [/MyProject/apps/services/api/MyApp/iphone/init]
worklight.js:5134 Application details header: {"applicationDetails":{"platformVersion":"7.0.0.0","nativeVersion":"1161280635"}}WL.Logger.__log @ worklight.js:5134
http://localhost:10080/MyProject/apps/services/api/MyApp/iphone/init Failed to load resource: the server responded with a status of 401 (Unauthorized)
worklight.js:5134 Application details header: {"applicationDetails":{"platformVersion":"7.0.0.0","nativeVersion":"1161280635"}}WL.Logger.__log @ worklight.js:5134
worklight.js:5134 Request [/MyProject/apps/services/api/MyApp/iphone/init]
angular-libs.js:8 [10:38:54]MyApp.home.controller :: [INFO] Welcome to MyApp
http://localhost:10080/favicon.ico Failed to load resource: the server responded with a status of 404 (Not Found)
worklight.js:5134 response [/MyProject/apps/services/api/MyApp/iphone/init] success: /*-secure-
{"userPrefs":{},"WL-Authentication-Success":{"wl_directUpdateRealm":{"userId":"null","attributes":{},"isUserAuthenticated":1,"displayName":"null","deviceId":"null"},"wl_remoteDisableRealm":{"userId":"null","attributes":{},"isUserAuthenticated":1,"displayName":"null","deviceId":"null"},"wl_antiXSRFRealm":{"userId":"1n4ulchkhlmjgom2cmafk8qvpm","attributes":{},"isUserAuthenticated":1,"displayName":"1n4ulchkhlmjgom2cmafk8qvpm","deviceId":"1n4ulchkhlmjgom2cmafk8qvpm"},"wl_deviceNoProvisioningRealm":{"userId":"previewDummyId","attributes":{"mobileClientData":"com.worklight.core.auth.ext.MobileClientData@ff55f"},"isUserAuthenticated":1,"displayName":"previewDummyId","deviceId":"previewDummyId"},"wl_anonymousUserRealm":{"userId":"6ba49e22-f899-4b14-ae72-fc4fde9100de","attributes":{},"isUserAuthenticated":1,"displayName":"6ba49e22-f899-4b14-ae72-fc4fde9100de","deviceId":"6ba49e22-f899-4b14-ae72-fc4fde9100de"}},"gadgetProps":{"ENVIRONMENT":"iphone"},"userInfo":{"SubscribeServlet":{"userId":null,"attributes":{},"isUserAuthenticated":0,"displayName":null,"deviceId":null},"wl_directUpdateRealm":{"userId":"null","attributes":{},"isUserAuthenticated":1,"displayName":"null","deviceId":"null"},"wl_authenticityRealm":{"userId":null,"attributes":{},"isUserAuthenticated":0,"displayName":null,"deviceId":null},"SampleAppRealm":{"userId":null,"attributes":{},"isUserAuthenticated":0,"displayName":null,"deviceId":null},"wl_remoteDisableRealm":{"userId":"null","attributes":{},"isUserAuthenticated":1,"displayName":"null","deviceId":"null"},"wl_antiXSRFRealm":{"userId":"1n4ulchkhlmjgom2cmafk8qvpm","attributes":{},"isUserAuthenticated":1,"displayName":"1n4ulchkhlmjgom2cmafk8qvpm","deviceId":"1n4ulchkhlmjgom2cmafk8qvpm"},"wl_deviceAutoProvisioningRealm":{"userId":null,"attributes":{},"isUserAuthenticated":0,"displayName":null,"deviceId":null},"wl_deviceNoProvisioningRealm":{"userId":"previewDummyId","attributes":{"mobileClientData":"com.worklight.core.auth.ext.MobileClientData@ff55f"},"isUserAuthenticated":1,"displayName":"previewDummyId","deviceId":"previewDummyId"},"myserver":{"userId":"6ba49e22-f899-4b14-ae72-fc4fde9100de","attributes":{},"isUserAuthenticated":1,"displayName":"6ba49e22-f899-4b14-ae72-fc4fde9100de","deviceId":"6ba49e22-f899-4b14-ae72-fc4fde9100de"},"wl_anonymousUserRealm":{"userId":"6ba49e22-f899-4b14-ae72-fc4fde9100de","attributes":{},"isUserAuthenticated":1,"displayName":"6ba49e22-f899-4b14-ae72-fc4fde9100de","deviceId":"6ba49e22-f899-4b14-ae72-fc4fde9100de"}}}*/
worklight.js:5788 No matching configurations found from the server. Defaulting to local configuration
worklight.js:5134 wlclient connect success
worklight.js:5134 before: initOptions.onSuccess
worklight.js:5134 after: initOptions.onSuccess
worklight.js:5134 wlclient init success
worklight.js:5134 Request [/MyProject/apps/services/loguploader]
worklight.js:5134 Application details header: {"applicationDetails":{"platformVersion":"7.0.0.0","nativeVersion":"1161280635"}}WL.Logger.__log @ worklight.js:5134
worklight.js:5134 Request [/MyProject/apps/services/loguploader]
worklight.js:5134 Application details header: {"applicationDetails":{"platformVersion":"7.0.0.0","nativeVersion":"1161280635"}}WL.Logger.__log @ worklight.js:5134
worklight.js:5134 response [/MyProject/apps/services/loguploader] success:
worklight.js:5701 Client logs successfully sent to the server
worklight.js:5134 response [/MyProject/apps/services/loguploader] success:
worklight.js:5701 Client logs successfully sent to the server
worklight.js:5134 Piggybacking event transmission
worklight.js:5134 Flush called
worklight.js:5134 Request [/MyProject/apps/services/api/MyApp/iphone/heartbeat]
worklight.js:5134 Application details header: {"applicationDetails":{"platformVersion":"7.0.0.0","nativeVersion":"1161280635"}}WL.Logger.__log @ worklight.js:5134
worklight.js:5134 response [/MyProject/apps/services/api/MyApp/iphone/heartbeat] success:
worklight.js:5134 Heartbeat sent successfully
worklight.js:5134 Piggybacking event transmission
worklight.js:5134 Flush called
worklight.js:5134 Request [/MyProject/apps/services/api/MyApp/iphone/heartbeat]
worklight.js:5134 Application details header: {"applicationDetails":{"platformVersion":"7.0.0.0","nativeVersion":"1161280635"}}WL.Logger.__log @ worklight.js:5134
worklight.js:5134 response [/MyProject/apps/services/api/MyApp/iphone/heartbeat] success:
worklight.js:5134 Heartbeat sent successfully
worklight.js:5134 Piggybacking event transmission
worklight.js:5134 Flush called
worklight.js:5134 Request [/MyProject/apps/services/api/MyApp/iphone/heartbeat]
worklight.js:5134 Application details header: {"applicationDetails":{"platformVersion":"7.0.0.0","nativeVersion":"1161280635"}}WL.Logger.__log @ worklight.js:5134
worklight.js:5134 response [/MyProject/apps/services/api/MyApp/iphone/heartbeat] success:
worklight.js:5134 Heartbeat sent successfully
worklight.js:5134 Piggybacking event transmission
worklight.js:5134 Flush called
worklight.js:5134 Request [/MyProject/apps/services/api/MyApp/iphone/heartbeat]
worklight.js:5134 Application details header: {"applicationDetails":{"platformVersion":"7.0.0.0","nativeVersion":"1161280635"}}WL.Logger.__log @ worklight.js:5134
worklight.js:5134 response [/MyProject/apps/services/api/MyApp/iphone/heartbeat] success:
worklight.js:5134 Heartbeat sent successfully
worklight.js:5134 Piggybacking event transmission
worklight.js:5134 Flush called
worklight.js:5134 Request [/MyProject/apps/services/api/MyApp/iphone/heartbeat]
worklight.js:5134 Application details header: {"applicationDetails":{"platformVersion":"7.0.0.0","nativeVersion":"1161280635"}}WL.Logger.__log @ worklight.js:5134
worklight.js:5134 response [/MyProject/apps/services/api/MyApp/iphone/heartbeat] success:
worklight.js:5134 Heartbeat sent successfully
worklight.js:5134 Piggybacking event transmission
worklight.js:5134 Flush called
worklight.js:5134 Request [/MyProject/apps/services/api/MyApp/iphone/heartbeat]
worklight.js:5134 Application details header: {"applicationDetails":{"platformVersion":"7.0.0.0","nativeVersion":"1161280635"}}WL.Logger.__log @ worklight.js:5134
worklight.js:5134 response [/MyProject/apps/services/api/MyApp/iphone/heartbeat] success:
worklight.js:5134 Heartbeat sent successfully
worklight.js:5134 Piggybacking event transmission
worklight.js:5134 Flush called
worklight.js:5134 Request [/MyProject/apps/services/api/MyApp/iphone/heartbeat]
worklight.js:5134 Application details header: {"applicationDetails":{"platformVersion":"7.0.0.0","nativeVersion":"1161280635"}}WL.Logger.__log @ worklight.js:5134
worklight.js:5134 response [/MyProject/apps/services/api/MyApp/iphone/heartbeat] success:
worklight.js:5134 Heartbeat sent successfully
worklight.js:5134 Piggybacking event transmission
worklight.js:5134 Flush called
worklight.js:5134 Request [/MyProject/apps/services/api/MyApp/iphone/heartbeat]
worklight.js:5134 Application details header: {"applicationDetails":{"platformVersion":"7.0.0.0","nativeVersion":"1161280635"}}WL.Logger.__log @ worklight.js:5134
worklight.js:5134 response [/MyProject/apps/services/api/MyApp/iphone/heartbeat] success:
worklight.js:5134 Heartbeat sent successfully
worklight.js:5134 Piggybacking event transmission
worklight.js:5134 Flush called
worklight.js:5134 Request [/MyProject/apps/services/api/MyApp/iphone/heartbeat]
worklight.js:5134 Application details header: {"applicationDetails":{"platformVersion":"7.0.0.0","nativeVersion":"1161280635"}}WL.Logger.__log @ worklight.js:5134PUBLIC_API.(anonymous function) @ worklight.js:5520window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.createRequestHeaders @ worklight.js:3337window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.sendRequest @ worklight.js:3395window.WLJSX.Ajax.WLRequest.WLJSX.Class.create.initialize @ worklight.js:3309klass @ worklight.js:527sendHeartBeat @ worklight.js:7276onTimerEvent @ worklight.js:896(anonymous function) @ worklight.js:959
worklight.js:5134 response [/MyProject/apps/services/api/MyApp/iphone/heartbeat] success:
worklight.js:5134 Heartbeat sent successfully
worklight.js:5134 Piggybacking event transmission
worklight.js:5134 Flush called
Eclipse を使用してプロジェクトをビルドしたときと、cli からビルドしたときに書き込まれたファイルに日付番号の違いがあることに気付きました... CLI の更新を確認して取得する簡単な方法はありますか?
(明確にするために、Eclipse で Studio を使用する場合、この問題は発生しません。)