下面的示例代碼不工作在Android上的最新修復,但如果我們從選項中刪除密碼字段,那麼它工作正常。我們正在以下錯誤在Android上,但它的工作對IOS精細JSON商店不是在Android中爲最新版本修復包7.1.0.00.20160919-1656
{ 「SRC」: 「initCollection」, 「犯錯」: - 3, 「味精」: 「INVALID_KEY_ON_PROVISION」, 「關口」: 「人」 「USR」: 「測試」, 「文檔」:{}, 「資源」:{}}
function wlCommonInit(){
/*
* Use of WL.Client.connect() API before any connectivity to a MobileFirst Server is required.
* This API should be called only once, before any other WL.Client methods that communicate with the MobileFirst Server.
* Don't forget to specify and implement onSuccess and onFailure callback functions for WL.Client.connect(), e.g:
*
* WL.Client.connect({
* onSuccess: onConnectSuccess,
* onFailure: onConnectFailure
* });
*
*/
// Common initialization code goes here
}
function onClick(){
alert("Click");
var collectionName = 'people';
// Object that defines all the collections.
var collections = {
// Object that defines the 'people' collection.
people : {
// Object that defines the Search Fields for the 'people' collection.
searchFields : {name: 'string', age: 'integer'}
}
};
// Optional options object.
var options = {
username:"test",
// Optional password, default no passw`enter code here`ord.
password : '123',
};
WL.JSONStore.init(collections, options)
.then(function() {
alert("Success in jstore");
})
.fail(function (errorObject) {
// Handle failure for any of the previous JSONStore operations (init, add).
alert("Failure in jstore : "+ JSON.stringify(errorObject));
});
};
您是否將構建於舊版本上的現有應用程序遷移至7.1.0.00.20160919-1656? –