[英]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.