クラウドを解析するために画像を挿入しようとしていますが、エラーが発生します。コードは次のとおりです。
public void uploadImage() {
File f = new File("/mnt/sdcard/test.jpg");
Bitmap bmp = BitmapFactory.decodeFile(f.getAbsolutePath());
ParseFile file = new ParseFile("test.jpg",bitmapToByteArray(bmp));
file.saveInBackground();
test = new ParseObject("Testing");
test.put("images", file);
test.saveInBackground();
}
そしてLogCatからのエラーコード:
02-25 12:08:53.259: E/AndroidRuntime(12444): FATAL EXCEPTION: AsyncTask #2
02-25 12:08:53.259: E/AndroidRuntime(12444): java.lang.RuntimeException: An error occured while executing doInBackground()
02-25 12:08:53.259: E/AndroidRuntime(12444): at android.os.AsyncTask$3.done(AsyncTask.java:200)
02-25 12:08:53.259: E/AndroidRuntime(12444): at java.util.concurrent.FutureTask$Sync.innerSetException(FutureTask.java:273)
02-25 12:08:53.259: E/AndroidRuntime(12444): at java.util.concurrent.FutureTask.setException(FutureTask.java:124)
02-25 12:08:53.259: E/AndroidRuntime(12444): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:307)
02-25 12:08:53.259: E/AndroidRuntime(12444): at java.util.concurrent.FutureTask.run(FutureTask.java:137)
02-25 12:08:53.259: E/AndroidRuntime(12444): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1068)
02-25 12:08:53.259: E/AndroidRuntime(12444): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:561)
02-25 12:08:53.259: E/AndroidRuntime(12444): at java.lang.Thread.run(Thread.java:1096)
02-25 12:08:53.259: E/AndroidRuntime(12444): Caused by: java.lang.RuntimeException: This query has an outstanding network connection. You have to wait until it's done.
02-25 12:08:53.259: E/AndroidRuntime(12444): at com.parse.ParseFile.assertNotRunning(ParseFile.java:126)
02-25 12:08:53.259: E/AndroidRuntime(12444): at com.parse.ParseFile.save(ParseFile.java:264)
02-25 12:08:53.259: E/AndroidRuntime(12444): at com.parse.ParseFile.save(ParseFile.java:258)
02-25 12:08:53.259: E/AndroidRuntime(12444): at com.parse.ParseObject.deepSave(ParseObject.java:1527)
02-25 12:08:53.259: E/AndroidRuntime(12444): at com.parse.ParseObject.save(ParseObject.java:924)
02-25 12:08:53.259: E/AndroidRuntime(12444): at com.parse.ParseObject$5.run(ParseObject.java:957)
02-25 12:08:53.259: E/AndroidRuntime(12444): at com.parse.ParseObject$5.run(ParseObject.java:954)
02-25 12:08:53.259: E/AndroidRuntime(12444): at com.parse.BackgroundTask.doInBackground(BackgroundTask.java:39)
02-25 12:08:53.259: E/AndroidRuntime(12444): at com.parse.BackgroundTask.doInBackground(BackgroundTask.java:1)
02-25 12:08:53.259: E/AndroidRuntime(12444): at android.os.AsyncTask$2.call(AsyncTask.java:185)
02-25 12:08:53.259: E/AndroidRuntime(12444): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
02-25 12:08:53.259: E/AndroidRuntime(12444): ... 4 more
エラーの原因がわかりません。助けてください。よろしくお願いします。