![](/img/trans.png)
[英]IBM worklight WL.JSONStore.QueryPart(). Jsonstore error
[英]JSONSTORE Mobilefirst 7.1 error java.lang.NoClassDefFoundError: com.worklight.jsonstore.util.JSONStoreUtil
初始化JSONSTORE函數時,出現錯誤java.lang.NoClassDefFoundError:com.worklight.jsonstore.util.JSONStoreUtil。
我正在使用Mobilefirst Studio 7.1.0.00-20160323-1606
在main.js中,我有以下代碼:
function wlCommonInit(){
var collectionCart = {
cartCellphones : {
searchFields: {id: 'integer', model: 'string', precio:'integer', caracteristicas:'string',image:'string',brand:'string'}
}
};
WL.JSONStore.init(collectionCart).then(function (collectionCart) {
// handle success - collection.people (people's collection)
}).fail(function (error) {
// handle failure
});
/************************JSON STORE Datos personales**********************************/
var collectionData = {
personalData : {
searchFields: {name: 'string', lastName:'string', photo:'string',telephone:'string',email:'string', datebirth: 'string',}
}
};
WL.JSONStore.init(collectionData).then(function (collectionData) {
// handle success - collection.people (people's collection)
}).fail(function (error) {
// handle failure
});
}
編輯
我在android studio項目中看到int文件.idea / libraries / libs.xml尚未導入jsonstore.jar
同樣在libs文件夾中,存在jsonstore.jar文件
我不知道這是否可能是一個問題。
我解決了我的問題,JSONSTORE沒有導入到Android Project中。 所以我用android Studio導入了jsonStore.jar,問題解決了。
您未指定是否已將JSONStore功能添加到項目中...
選擇application-descriptor.xml文件,然后單擊“編輯器”選項卡。
從UI中選擇您的環境,然后從Optional部分中向其添加JSONStore功能。
在此處查看完整說明: https : //developer.ibm.com/mobilefirstplatform/documentation/getting-started-7-1/foundation/data/jsonstore/jsonstore-javascript-api/#add-feature
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.