初始化JSONSTORE函数时,出现了错误java.lang.NoClassDefFoundError: com.worklight.jsonstore.util.JSONStoreUtil。
我正在使用Mobilefirst 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项目中看到,在文件. .idea/libraries/libs.xml中没有导入jsonstore.jar
libs.xml
在文件夹库中,也存在文件jsonstore.jar。
libs
我不知道这会不会是个问题。
发布于 2016-04-28 22:47:48
我解决了我的问题,JSONSTORE不是在Android项目中导入的。所以我用android导入了jsonStore.jar,问题就解决了。
增加图书馆
发布于 2016-03-31 04:40:13
您没有指定是否将JSONStore特性添加到项目中.
选择应用程序-描述符. tab文件并单击Editor选项卡。
从UI中选择您的环境,并从可选部分向其添加JSONStore特性。
https://stackoverflow.com/questions/36324162
复制相似问题