gpt4 book ai didi

android - ParseUser 固定保存最终本地数据存储错误

转载 作者:太空宇宙 更新时间:2023-11-03 11:11:30 27 4
gpt4 key购买 nike

我在启用本地数据存储时开始出现此错误。我不知道如何解决它。我正在查看文档,但到目前为止什么也没发现……应用程序没有崩溃,但显然大部分时间都无法将任何内容保存到用户对象。

05-03 02:17:24.350: E/ParsePinningEventuallyQueue(1110): Failed to run command.
05-03 02:17:24.350: E/ParsePinningEventuallyQueue(1110): com.parse.ParseException: Parse::UserCannotBeAlteredWithoutSessionError
05-03 02:17:24.350: E/ParsePinningEventuallyQueue(1110): at com.parse.ParseCommand.onPostExecute(ParseCommand.java:334)
05-03 02:17:24.350: E/ParsePinningEventuallyQueue(1110): at com.parse.ParseRequest$5.then(ParseRequest.java:321)
05-03 02:17:24.350: E/ParsePinningEventuallyQueue(1110): at com.parse.ParseRequest$5.then(ParseRequest.java:318)
05-03 02:17:24.350: E/ParsePinningEventuallyQueue(1110): at com.parse.Task$11.run(Task.java:481)
05-03 02:17:24.350: E/ParsePinningEventuallyQueue(1110): at com.parse.Task$ImmediateExecutor.execute(Task.java:673)
05-03 02:17:24.350: E/ParsePinningEventuallyQueue(1110): at com.parse.Task.completeAfterTask(Task.java:477)
05-03 02:17:24.350: E/ParsePinningEventuallyQueue(1110): at com.parse.Task.continueWithTask(Task.java:353)
05-03 02:17:24.350: E/ParsePinningEventuallyQueue(1110): at com.parse.Task.continueWithTask(Task.java:364)
05-03 02:17:24.350: E/ParsePinningEventuallyQueue(1110): at com.parse.Task$9.then(Task.java:410)
05-03 02:17:24.350: E/ParsePinningEventuallyQueue(1110): at com.parse.Task$9.then(Task.java:402)
05-03 02:17:24.350: E/ParsePinningEventuallyQueue(1110): at com.parse.Task$11.run(Task.java:481)
05-03 02:17:24.350: E/ParsePinningEventuallyQueue(1110): at com.parse.Task$ImmediateExecutor.execute(Task.java:673)
05-03 02:17:24.350: E/ParsePinningEventuallyQueue(1110): at com.parse.Task.completeAfterTask(Task.java:477)
05-03 02:17:24.350: E/ParsePinningEventuallyQueue(1110): at com.parse.Task.access$400(Task.java:22)
05-03 02:17:24.350: E/ParsePinningEventuallyQueue(1110): at com.parse.Task$7.then(Task.java:346)
05-03 02:17:24.350: E/ParsePinningEventuallyQueue(1110): at com.parse.Task$7.then(Task.java:343)
05-03 02:17:24.350: E/ParsePinningEventuallyQueue(1110): at com.parse.Task.runContinuations(Task.java:510)

我设法指出了产生错误的代码。它与在当前用户中使用 saveEventually() 有关...使用 saveinbackground() 不会发生...

ParseUser cu = ParseUser.getCurrentUser(); 

if (cu != null) {

String locale = getResources().getConfiguration().locale.getDisplayName();
cu.put("locale", locale);
cu.put("version", ParseInstallation.getCurrentInstallation().getString("appVersion"));
cu.saveEventually(); //doesn't happen with cu.saveInBackground();
}

最佳答案

Parse Android Changelog

v1.5.1 — May 30, 2014

Fixed various bugs with Local Datastore.

上一个 Parse Android SDK v1.5.0 确实存在一些错误,但对我来说,它们已在今天发布的 1.5.1 版本中得到修复,您应该检查一下并重试。

关于android - ParseUser 固定保存最终本地数据存储错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23812189/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com