Android app with coroutines 0.30.1-eap13 crashes in runtime
See original GitHub issuejava.lang.IllegalStateException: Module with Main dispatcher is missing. Add dependency with required Main dispatcher, e.g. 'kotlinx-coroutines-android'
at kotlinx.coroutines.Dispatchers.getMain(Dispatchers.kt:61)
kotlinx-coroutines-android
is obviously added.
Version 0.30.0-eap13 works fine.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:8
- Comments:22 (4 by maintainers)
Top Results From Across the Web
Kotlin android app crashes because of coroutines
1, my app is crashing when I open 2 different activities where such a communication is happening. Here's the error I'm getting: E/AndroidRuntime...
Read more >Crashes - Android Developers
An Android app crashes whenever there's an unexpected exit caused by an unhandled exception or signal. An app that is written using Java...
Read more >Sporadic native crash on Android when debugging coroutines
Sometimes(about 80% of the time) when I'm hitting breakpoint in a depply nested coroutine call, my app crashes inside _native_ code.
Read more >runtime NPE in Kotlin Coroutine Dispatcher - Issue Tracker
makes the app to crash as soon as it is launched because of missing Kotlin Coroutine Dispatcher -> This is what the crash...
Read more >Coroutines in Android explained - Zaid Zakir - Medium
What is coroutines? · If your app has some requirement to block the main thread while performing a task in suspend function. ·...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
If an app is obfustacted with default proguard settings, it crashes in runtime. Here is sample project to reproduce an issue: https://www.dropbox.com/s/eay696h9qmxjl5e/sample.zip?dl=1 UPD: I’ve created PR #662 but it will not work, because
@Keep
annotation is Android specific. Is the only way to add proguard rules?The same issue with
0.30.1
in release build only (i. e. whenminifyEnabled true
is specified)Android Studio 3.1.2 Build #AI-173.4720617, built on April 14, 2018 JRE: 1.8.0_152-release-1024-b01 x86_64 JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o Mac OS X 10.13.4
Didn’t work:
Worked: