[英]IBM worklight WL.JSONStore.QueryPart(). Jsonstore error
[英]WL.JsonStore is not initialized, When trying to build the cordova IBM Mobile First Application in Android devices and In Android Emulator
我点击了以下链接
我还添加了 JsonStore 插件
尝试初始化 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 需要初始化。 Kinldy 帮我解决这个问题。
最后,我在 IBM TroubleShoot 站点找到了答案
请参考链接:
https://mobilefirstplatform.ibmcloud.com/tutorials/ru/foundation/8.0/troubleshooting/jsonstore/
在 config.xml 中,将 clientCustomInit 属性更改为 true。 在 index.js 文件中:在文件开头添加以下行:
document.addEventListener('mfpjsonjsloaded', initWL, false);
在 wlCommonInit() 中保留 WL.JSONStore.init 调用
添加以下功能:
function initWL(){
var options = typeof wlInitOptions !== 'undefined' ? wlInitOptions
: {};
WL.Client.init(options);
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.