Reputation: 63
The app works fine on debug and profile mode but not on release mode. When I click the button "listen to voice" it crashes. In debug and profile mode, I click it and there is no problem. I run my app with this: flutter run --release
and I see this error:
E/AndroidRuntime(24397): FATAL EXCEPTION: main
E/AndroidRuntime(24397): Process: com.konukcustudio.sprien, PID: 24397
E/AndroidRuntime(24397): java.lang.IllegalStateException: Module with the Main dispatcher is missing. Add dependency providing the Main dispatcher, e.g. 'kotlinx-coroutines-android' and ensure it has the same version as 'kotlinx-coroutines-core'
E/AndroidRuntime(24397): at g.a.x1.p.a(Unknown Source:4)
E/AndroidRuntime(24397): at g.a.x1.q.h(Unknown Source:55)
E/AndroidRuntime(24397): at g.a.x1.q.b(Unknown Source:0)
E/AndroidRuntime(24397): at g.a.x1.e.a(Unknown Source:16)
E/AndroidRuntime(24397): at g.a.y1.a.a(Unknown Source:15)
E/AndroidRuntime(24397): at g.a.y1.a.a(Unknown Source:5)
E/AndroidRuntime(24397): at g.a.d0.a(Unknown Source:41)
E/AndroidRuntime(24397): at g.a.a.a(Unknown Source:3)
E/AndroidRuntime(24397): at g.a.d.a(Unknown Source:22)
E/AndroidRuntime(24397): at g.a.c.a(Unknown Source:0)
E/AndroidRuntime(24397): at g.a.d.a(Unknown Source:12)
E/AndroidRuntime(24397): at g.a.c.a(Unknown Source:0)
E/AndroidRuntime(24397): at c.c.a.a.g.a(Unknown Source:139)
E/AndroidRuntime(24397): at c.c.a.a.b.onMethodCall(Unknown Source:706)
E/AndroidRuntime(24397): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(Unknown Source:17)
E/AndroidRuntime(24397): at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(Unknown Source:57)
E/AndroidRuntime(24397): at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(Unknown Source:4)
E/AndroidRuntime(24397): at android.os.MessageQueue.nativePollOnce(Native Method)
E/AndroidRuntime(24397): at android.os.MessageQueue.next(MessageQueue.java:326)
E/AndroidRuntime(24397): at android.os.Looper.loop(Looper.java:181)
E/AndroidRuntime(24397): at android.app.ActivityThread.main(ActivityThread.java:7050)
E/AndroidRuntime(24397): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(24397): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:494)
E/AndroidRuntime(24397): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:964)
Upvotes: 1
Views: 1019
Reputation: 605
Hi this problem has already been discussed here
just add these as dependencies (check latest version too)
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.6'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.6'
Sometimes in 'debug' mode errors are shown as warnings. Please provide the log and a bit of code when performing the same function when in ' --debug ' mode.
Upvotes: 1