novoda / download-manager

A library that handles long-running downloads, handling the network interactions and retrying downloads automatically after failures
Apache License 2.0
483 stars 63 forks source link

java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare() #531

Open SoheibBettahar opened 4 years ago

SoheibBettahar commented 4 years ago

java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare() at android.os.Handler.(Handler.java:208) at android.os.Handler.(Handler.java:122) at android.widget.Toast$TN.(Toast.java:351) at android.widget.Toast.(Toast.java:106) at android.widget.Toast.makeText(Toast.java:265) at com.ssquare.myapplication.monokrome.util.UtilsKt.toast(Utils.kt:44) at com.ssquare.myapplication.monokrome.util.DownloadUtils$downloadFile$1.invokeSuspend(DownloadUtils.kt:76) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:56)