| |||||||
Das Thema "AsyncTask warten lassen" befindet sich unter Android App Entwicklung auf Android-Hilfe.de.
|
| | Themen-Optionen | Ansicht |
| | #1 (permalink) |
| Android-Hilfe.de Mitglied Modell: Samsung Galaxy S2 (I9100) Registriert seit: 24.10.2011
Beiträge: 77
Abgegebene Danke: 13
Erhielt 2 Danke für 2 Beiträge
| ich würd gern meinen AsyncTask eine Sekunde warten lassen. Bekomme allerdings beim Aufruf von wait(long milli) diesen Fehler Code: 11-24 15:46:29.240: VERBOSE/Exception(25800): java.lang.IllegalMonitorStateException: object not locked by thread before wait() 11-24 15:46:29.240: VERBOSE/Exception(25800): at java.lang.Object.wait(Native Method) 11-24 15:46:29.240: VERBOSE/Exception(25800): at java.lang.Object.wait(Object.java:395) 11-24 15:46:29.240: VERBOSE/Exception(25800): at aha.pa.kommunikation.Json.liesJsonProducts(Json.java:389) 11-24 15:46:29.240: VERBOSE/Exception(25800): at aha.pa.kommunikation.Json$ProductTask.doInBackground(Json.java:108) 11-24 15:46:29.240: VERBOSE/Exception(25800): at aha.pa.kommunikation.Json$ProductTask.doInBackground(Json.java:1) 11-24 15:46:29.240: VERBOSE/Exception(25800): at android.os.AsyncTask$2.call(AsyncTask.java:185) 11-24 15:46:29.240: VERBOSE/Exception(25800): at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:306) 11-24 15:46:29.240: VERBOSE/Exception(25800): at java.util.concurrent.FutureTask.run(FutureTask.java:138) 11-24 15:46:29.240: VERBOSE/Exception(25800): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1088) 11-24 15:46:29.240: VERBOSE/Exception(25800): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:581) 11-24 15:46:29.240: VERBOSE/Exception(25800): at java.lang.Thread.run(Thread.java:1019) |
| | |
| | #2 (permalink) |
| Fortgeschrittenes Mitglied Registriert seit: 14.08.2009
Beiträge: 354
Abgegebene Danke: 23
Erhielt 49 Danke für 43 Beiträge
|
Thread.sleep(1000); google hätte geholfen
__________________ http://android.fungamer.net/ |
| | |
![]() |
|
| Themen-Optionen | |
| Ansicht | |
| |
| ||||
| Thema | Autor | Forum | Antworten | Letzter Beitrag |
| AsyncTask verursacht OutOfMemory Exception | samarek | Android App Entwicklung | 11 | 22.11.2011 13:30 |
| Kommunikation zwischen AsyncTask und Activity? | user7 | Android App Entwicklung | 4 | 16.03.2011 10:05 |
| AsyncTask (progressdialog parallel anzeigen) | mr.freeze | Android App Entwicklung | 13 | 28.02.2011 19:19 |
| AsyncTask, GPS, was muss parallel laufen? | Artwork | Android App Entwicklung | 0 | 07.08.2010 15:24 |