【问题标题】:IBM Mobile first JSONstore is not working 7.1 versionIBM Mobile first JSONstore is not working 7.1 版本
【发布时间】:2017-06-30 13:13:15
【问题描述】:

我的移动第一工作室插件版本是7.1.0.00-20161006-0540。我们已将服务器升级到最新的 iFix IMF 00-20161118-2214

我们刚开始使用 IBM 知识中心为 JSONstore 提供的示例代码,但出现错误 -11 OPERATION_FAILED_ON_SPECIFIC_DOCUMENT

我们使用 WLinit 中的 JavaScript 调用 JSONStore 初始化然后只有我们会得到这个错误 -11,如果它在 Wlinit 之外它不会在控制台中显示任何内容。

我们已经在应用程序描述符文件中提到了 JSONSTORE

【问题讨论】:

  • 上面提到的 iFix 是针对服务器端的。我的移动第一工作室插件版本是 7.1.0.00-20161006-0540。 studio 插件是否需要 iFix?
  • 始终建议同时更新服务器和 Studio(并重建应用程序)。请尝试。

标签: ibm-mobilefirst jsonstore


【解决方案1】:

终于找到问题所在了。 问题出在 config.xml

这里的功能标签名称错误。我将 StoragePluginStoragePlugin 替换为 StoragePlugin。

在新的 iFix 中也有同样的问题。

谢谢

【讨论】:

    【解决方案2】:

    从 WLInit 调用 JSONStore(在 initOptions.js 中?)不是为 JSONStore 进行初始化的地方...

    您应该在 main.js 中的 function wlCommonInit() 中初始化一个 JSONStore 集合,如下所示:

     function wlCommonInit() {
         var collections = {
             people : {
                  searchFields: {name: 'string', age: 'integer'}
             }
         };
    
         WL.JSONStore.init(collections).then(function (collections) {
             // handle success - collection.people (people's collection)
             alert("success);
         }).fail(function (error) {
             // handle failure
             alert ("failure");
         });
    }
    

    【讨论】:

    • 感谢您的回复。我仍然有同样的问题。我按照上面的步骤。我正在从 android studio 构建。我在 gradle 中遇到了构建错误。为避免该错误,我使用了 android { PackagingOptions { exclude 'META-INF/NOTICE' exclude 'META-INF/LICENSE' exclude 'META-INF/ASL2.0' } } 这个排除有什么问题吗? (只有在我的应用程序描述符中添加 JSON 存储时才会出现此错误。)
    • 尝试从 IBM Fix Central 下载最新的 7.1 studio iFix,然后在新项目中重试。
    • 您能否提供重现此问题的项目?
    • 它在点击事件中工作。但是onload初始化是不可能的
    猜你喜欢
    • 1970-01-01
    • 2018-06-30
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-01-03
    • 1970-01-01
    • 2020-05-09
    相关资源
    最近更新 更多