简体   繁体   English

WL.JsonStore 未初始化,当尝试在 Android 设备和 Android 模拟器中构建 cordova IBM Mobile First 应用程序时

[英]WL.JsonStore is not initialized, When trying to build the cordova IBM Mobile First Application in Android devices and In Android Emulator

I Followed the Following Link我点击了以下链接

https://mobilefirstplatform.ibmcloud.com/tutorials/en/foundation/8.0/application-development/jsonstore/cordova/#adding-jsonstore https://mobilefirstplatform.ibmcloud.com/tutorials/en/foundation/8.0/application-development/jsonstore/cordova/#adding-jsonstore

I have Also added the JsonStore Plugin我还添加了 JsonStore 插件

Wl.jsonStore is not Initialized when trying to initialize the Cordova Mobile First application尝试初始化 Cordova Mobile First 应用程序时未初始化 Wl.jsonStore

 WL.JSONStore.init(collections).then(function (collections) {                
    alert("collections creted sucessfully");
     console.log("Collections created sucessfully");
    // handle success - collection.people (people's collection)
                                            }).fail(function 
    (error) {
alert(error);
     console.log(error);// handle failure                                       });

WL.Store is need to Initialized. WL.Store 需要初始化。 Kinldy Help me out To fix this Issue. Kinldy 帮我解决这个问题。

在此处输入图像描述

At Last, I Found my answer in the IBM TroubleShoot Site最后,我在 IBM TroubleShoot 站点找到了答案

Kindly Refer the Link:请参考链接:

https://mobilefirstplatform.ibmcloud.com/tutorials/ru/foundation/8.0/troubleshooting/jsonstore/ https://mobilefirstplatform.ibmcloud.com/tutorials/ru/foundation/8.0/troubleshooting/jsonstore/

In config.xml, change the clientCustomInit property to true.在 config.xml 中,将 clientCustomInit 属性更改为 true。 In index.js file: add the following line at the beginning of the file:在 index.js 文件中:在文件开头添加以下行:

document.addEventListener('mfpjsonjsloaded', initWL, false);

leave the WL.JSONStore.init call in wlCommonInit()在 wlCommonInit() 中保留 WL.JSONStore.init 调用

add the following function:添加以下功能:

function initWL(){                                                     
  var options = typeof wlInitOptions !== 'undefined' ? wlInitOptions
  : {};                                                                
  WL.Client.init(options);                                           
}   

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 IBM工作灯WL.JSONStore.QueryPart()。 Jsonstore错误 - IBM worklight WL.JSONStore.QueryPart(). Jsonstore error 如何在android中远程更新我的cordova / phonegap移动应用程序? - How to update my cordova/phonegap mobile application remotely in android? Cordova 相机插件适用于模拟器,而不适用于 Android 设备 - Cordova camera plugin works on emulator and not on Android device cordova admobpro 广告未在 Android 设备上显示 - cordova admobpro ads not showing on Android devices 尝试在Android中使用ng-cordova移动文件时没有任何反应 - Nothing happens when trying to move a file with ng-cordova in Android 控制台日志不适用于Netbeans(Android仿真器和Cordova) - Console log is not working with Netbeans (Android emulator and Cordova) 如何解决Cordova Android模拟器问题? - How to fix Cordova Android emulator problem? Android:“ pageshow”软键盘上的JQuery-Mobile首次未使用Cordova出现 - Android: JQuery-Mobile on “pageshow” softkeyboard not showing up the first time with Cordova 移动设备的屏幕宽度(android和ipod均) - Screen width of mobile devices ( android and ipod both) onmouseover不适用于android移动设备 - onmouseover doesn't work for android mobile devices
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM