首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >JSONSTORE Mobilefirst 7.1错误java.lang.NoClassDefFoundError: com.worklight.jsonstore.util.JSONStoreUtil

JSONSTORE Mobilefirst 7.1错误java.lang.NoClassDefFoundError: com.worklight.jsonstore.util.JSONStoreUtil
EN

Stack Overflow用户
提问于 2016-03-31 04:27:24
回答 2查看 157关注 0票数 0

初始化JSONSTORE函数时,出现了错误java.lang.NoClassDefFoundError: com.worklight.jsonstore.util.JSONStoreUtil。

我正在使用Mobilefirst 7.1.0.00-20160323-1606

在main.js中,我有以下代码:

代码语言:javascript
复制
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

我不知道这会不会是个问题。

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2016-04-28 22:47:48

我解决了我的问题,JSONSTORE不是在Android项目中导入的。所以我用android导入了jsonStore.jar,问题就解决了。

增加图书馆

票数 3
EN

Stack Overflow用户

发布于 2016-03-31 04:40:13

您没有指定是否将JSONStore特性添加到项目中.

选择应用程序-描述符. tab文件并单击Editor选项卡。

从UI中选择您的环境,并从可选部分向其添加JSONStore特性。

请参阅这里的完整说明:https://developer.ibm.com/mobilefirstplatform/documentation/getting-started-7-1/foundation/data/jsonstore/jsonstore-javascript-api/#add-feature

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/36324162

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档