Skip to content
This repository has been archived by the owner on Oct 18, 2024. It is now read-only.

[BUG] Toast in a background thread #160

Closed
9hm2 opened this issue Apr 14, 2022 · 0 comments
Closed

[BUG] Toast in a background thread #160

9hm2 opened this issue Apr 14, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@9hm2
Copy link

9hm2 commented Apr 14, 2022

Describe the bug

To Reproduce
Steps to reproduce the behavior:

Expected behavior

Screenshots

Details (please complete the following information):
AndroidIDE crash report
Manufacturer: OnePlus
Device: OnePlus7TPro
App version: 2.0.1-beta (201)

Stacktrace:
java.lang.RuntimeException: Can't toast on a thread that has not called Looper.prepare()
at android.widget.Toast$TN.(Toast.java:423)
at android.widget.Toast.(Toast.java:134)
at android.widget.Toast.makeText(Toast.java:299)
at android.widget.Toast.makeText(Toast.java:289)
at com.itsaky.toaster.Toaster.show(Toaster.java:112)
at com.itsaky.androidide.utils.StudioUtils.toast(StudioUtils.java:43)
at com.itsaky.androidide.app.BaseApplication.toast(BaseApplication.java:212)
at com.itsaky.androidide.services.builder.IDEService.lambda$readIdeProject$1$com-itsaky-androidide-services-builder-IDEService(IDEService.java:184)
at com.itsaky.androidide.services.builder.IDEService$$ExternalSyntheticLambda1.run(Unknown Source:4)
at java.lang.Thread.run(Thread.java:919)

Additional context

@9hm2 9hm2 added the bug Something isn't working label Apr 14, 2022
@itsaky itsaky changed the title AndroidIDE crashed [BUG] Toast in a background thread Apr 15, 2022
@itsaky itsaky closed this as completed in 8072ac7 Apr 22, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant