我有时会遇到运行时错误,如下所示。
我认为这是因为我的wifi发生了一些变化,但我不确定。
有谁知道为什么会出现这种错误?我们该如何解决?我无法使用Google找到任何内容。
导致问题的代码是:
//make new object
ParseObject LogNew = new ParseObject("Log");
//make file
file = new ParseFile("_"+getHashedID()+"_"+fileNames[i], fileContent);
//put file
LogNew.put("EmailLog"+i, file);
try {
**LogNew.save();**
} catch (com.parse.ParseException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
保存在ParseService.521,这就是它所抱怨的。
11-01 10:51:36.115: E/AndroidRuntime(16385): FATAL EXCEPTION: Thread-8879
11-01 10:51:36.115: E/AndroidRuntime(16385): Process: com.youplusplus, PID: 16385
11-01 10:51:36.115: E/AndroidRuntime(16385): java.lang.RuntimeException: bolts.AggregateException: There were multiple errors.
11-01 10:51:36.115: E/AndroidRuntime(16385): at com.parse.Parse.waitForTask(Parse.java:881)
11-01 10:51:36.115: E/AndroidRuntime(16385): at com.parse.ParseObject.save(ParseObject.java:1337)
11-01 10:51:36.115: E/AndroidRuntime(16385): at com.youplusplus.ParseService.ParseForLogs(ParseService.java:521)
11-01 10:51:36.115: E/AndroidRuntime(16385): at com.youplusplus.ParseService$Task.run(ParseService.java:771)
11-01 10:51:36.115: E/AndroidRuntime(16385): at java.lang.Thread.run(Thread.java:841)
11-01 10:51:36.115: E/AndroidRuntime(16385): Caused by: bolts.AggregateException: There were multiple errors.
11-01 10:51:36.115: E/AndroidRuntime(16385): at bolts.Task$3.then(Task.java:246)
11-01 10:51:36.115: E/AndroidRuntime(16385): at bolts.Task$3.then(Task.java:228)
11-01 10:51:36.115: E/AndroidRuntime(16385): at bolts.Task$9.run(Task.java:444)
11-01 10:51:36.115: E/AndroidRuntime(16385): at bolts.BoltsExecutors$ImmediateExecutor.execute(BoltsExecutors.java:97)
11-01 10:51:36.115: E/AndroidRuntime(16385): at bolts.Task.completeImmediately(Task.java:440)
11-01 10:51:36.115: E/AndroidRuntime(16385): at bolts.Task.access$100(Task.java:27)
11-01 10:51:36.115: E/AndroidRuntime(16385): at bolts.Task$5.then(Task.java:307)
11-01 10:51:36.115: E/AndroidRuntime(16385): at bolts.Task$5.then(Task.java:304)
11-01 10:51:36.115: E/AndroidRuntime(16385): at bolts.Task.runContinuations(Task.java:506)
11-01 10:51:36.115: E/AndroidRuntime(16385): at bolts.Task.access$600(Task.java:27)
11-01 10:51:36.115: E/AndroidRuntime(16385): at bolts.Task$TaskCompletionSource.trySetError(Task.java:577)
11-01 10:51:36.115: E/AndroidRuntime(16385): at com.parse.ParseFile$3$1.then(ParseFile.java:433)
11-01 10:51:36.115: E/AndroidRuntime(16385): at com.parse.ParseFile$3$1.then(ParseFile.java:426)
11-01 10:51:36.115: E/AndroidRuntime(16385): at bolts.Task$9.run(Task.java:444)
11-01 10:51:36.115: E/AndroidRuntime(16385): at bolts.BoltsExecutors$ImmediateExecutor.execute(BoltsExecutors.java:97)
11-01 10:51:36.115: E/AndroidRuntime(16385): at bolts.Task.completeImmediately(Task.java:440)
11-01 10:51:36.115: E/AndroidRuntime(16385): at bolts.Task.access$100(Task.java:27)
11-01 10:51:36.115: E/AndroidRuntime(16385): at bolts.Task$5.then(Task.java:307)
11-01 10:51:36.115: E/AndroidRuntime(16385): at bolts.Task$5.then(Task.java:304)
11-01 10:51:36.115: E/AndroidRuntime(16385): at bolts.Task.runContinuations(Task.java:506)
11-01 10:51:36.115: E/AndroidRuntime(16385): at bolts.Task.access$600(Task.java:27)
11-01 10:51:36.115: E/AndroidRuntime(16385): at bolts.Task$TaskCompletionSource.trySetError(Task.java:577)
11-01 10:51:36.115: E/AndroidRuntime(16385): at bolts.Task$TaskCompletionSource.setError(Task.java:604)
11-01 10:51:36.115: E/AndroidRuntime(16385): at bolts.Task$10$1.then(Task.java:487)
11-01 10:51:36.115: E/AndroidRuntime(16385): at bolts.Task$10$1.then(Task.java:481)
11-01 10:51:36.115: E/AndroidRuntime(16385): at bolts.Task$9.run(Task.java:444)
11-01 10:51:36.115: E/AndroidRuntime(16385): at bolts.BoltsExecutors$ImmediateExecutor.execute(BoltsExecutors.java:97)
11-01 10:51:36.115: E/AndroidRuntime(16385): at bolts.Task.completeImmediately(Task.java:440)
11-01 10:51:36.115: E/AndroidRuntime(16385): at bolts.Task.continueWith(Task.java:314)
11-01 10:51:36.115: E/AndroidRuntime(16385): at bolts.Task.continueWith(Task.java:325)
11-01 10:51:36.115: E/AndroidRuntime(16385): at bolts.Task$10.run(Task.java:481)
11-01 10:51:36.115: E/AndroidRuntime(16385): at bolts.BoltsExecutors$ImmediateExecutor.execute(BoltsExecutors.java:97)
11-01 10:51:36.115: E/AndroidRuntime(16385): at bolts.Task.completeAfterTask(Task.java:473)
11-01 10:51:36.115: E/AndroidRuntime(16385): at bolts.Task.access$200(Task.java:27)
11-01 10:51:36.115: E/AndroidRuntime(16385): at bolts.Task$6.then(Task.java:342)
11-01 10:51:36.115: E/AndroidRuntime(16385): at bolts.Task$6.then(Task.java:339)
11-01 10:51:36.115: E/AndroidRuntime(16385): at bolts.Task.runContinuations(Task.java:506)
11-01 10:51:36.115: E/AndroidRuntime(16385): at bolts.Task.access$600(Task.java:27)
11-01 10:51:36.115: E/AndroidRuntime(16385): at bolts.Task$TaskCompletionSource.trySetError(Task.java:577)
11-01 10:51:36.115: E/AndroidRuntime(16385): at bolts.Task$TaskCompletionSource.setError(Task.java:604)
11-01 10:51:36.115: E/AndroidRuntime(16385): at bolts.Task$10$1.then(Task.java:487)
11-01 10:51:36.115: E/AndroidRuntime(16385): at bolts.Task$10$1.then(Task.java:481)
11-01 10:51:36.115: E/AndroidRuntime(16385): at bolts.Task$9.run(Task.java:444)
11-01 10:51:36.115: E/AndroidRuntime(16385): at bolts.BoltsExecutors$ImmediateExecutor.execute(BoltsExecutors.java:97)
11-01 10:51:36.115: E/AndroidRuntime(16385): at bolts.Task.completeImmediately(Task.java:440)
11-01 10:51:36.115: E/AndroidRuntime(16385): at bolts.Task.continueWith(Task.java:314)
11-01 10:51:36.115: E/AndroidRuntime(16385): at bolts.Task.continueWith(Task.java:325)
11-01 10:51:36.115: E/AndroidRuntime(16385): at bolts.Task$10.run(Task.java:481)
11-01 10:51:36.115: E/AndroidRuntime(16385): at bolts.BoltsExecutors$ImmediateExecutor.execute(BoltsExecutors.java:97)
11-01 10:51:36.115: E/AndroidRuntime(16385): at bolts.Task.completeAfterTask(Task.java:473)
11-01 10:51:36.115: E/AndroidRuntime(16385): at bolts.Task.access$200(Task.java:27)
11-01 10:51:36.115: E/AndroidRuntime(16385): at bolts.Task$6.then(Task.java:342)
11-01 10:51:36.115: E/AndroidRuntime(16385): at bolts.Task$6.then(Task.java:339)
11-01 10:51:36.115: E/AndroidRuntime(16385): at bolts.Task.runContinuations(Task.java:506)
11-01 10:51:36.115: E/AndroidRuntime(16385): at bolts.Task.access$600(Task.java:27)
11-01 10:51:36.115: E/AndroidRuntime(16385): at bolts.Task$TaskCompletionSource.trySetError(Task.java:577)
11-01 10:51:36.115: E/AndroidRuntime(16385): at bolts.Task$TaskCompletionSource.setError(Task.java:604)
11-01 10:51:36.115: E/AndroidRuntime(16385): at bolts.Task$10$1.then(Task.java:487)
11-01 10:51:36.115: E/AndroidRuntime(16385): at bolts.Task$10$1.then(Task.java:481)
11-01 10:51:36.115: E/AndroidRuntime(16385): at bolts.Task$9.run(Task.java:444)
11-01 10:51:36.115: E/AndroidRuntime(16385): at bolts.BoltsExecutors$ImmediateExecutor.execute(BoltsExecutors.java:97)
11-01 10:51:36.115: E/AndroidRuntime(16385): at bolts.Task.completeImmediately(Task.java:440)
11-01 10:51:36.115: E/AndroidRuntime(16385): at bolts.Task.access$100(Task.java:27)
11-01 10:51:36.115: E/AndroidRuntime(16385): at bolts.Task$5.then(Task.java:307)
11-01 10:51:36.115: E/AndroidRuntime(16385): at bolts.Task$5.then(Task.java:304)
11-01 10:51:36.115: E/AndroidRuntime(16385): at bolts.Task.runContinuations(Task.java:506)
11-01 10:51:36.115: E/AndroidRuntime(16385): at bolts.Task.access$600(Task.java:27)
11-01 10:51:36.115: E/AndroidRuntime(16385): at bolts.Task$TaskCompletionSource.trySetError(Task.java:577)
11-01 10:51:36.115: E/AndroidRuntime(16385): at bolts.Task$TaskCompletionSource.setError(Task.java:604)
11-01 10:51:36.115: E/AndroidRuntime(16385): at bolts.Task$10$1.then(Task.java:487)
11-01 10:51:36.115: E/AndroidRuntime(16385): at bolts.Task$10$1.then(Task.java:481)
11-01 10:51:36.115: E/AndroidRuntime(16385): at bolts.Task$9.run(Task.java:444)
11-01 10:51:36.115: E/AndroidRuntime(16385): at bolts.BoltsExecutors$ImmediateExecutor.execute(BoltsExecutors.java:97)
11-01 10:51:36.115: E/AndroidRuntime(16385): at bolts.Task.completeImmediately(Task.java:440)
11-01 10:51:36.115: E/AndroidRuntime(16385): at bolts.Task.access$100(Task.java:27)
11-01 10:51:36.115: E/AndroidRuntime(16385): at bolts.