Fatal Exception: java.lang.RuntimeException: Unable to destroy activity {com.example.app.MainActivity}: java.lang.IllegalArgumentException:

Viewed 1026

My flutter application keeps on crashing and logging this error on firebase crash analytics

Fatal Exception: java.lang.RuntimeException: Unable to destroy activity {com.aims.covidsurvey/com.example.app.MainActivity}: java.lang.IllegalArgumentException: Parameter specified as non-null is null: method kotlin.jvm.internal.Intrinsics.checkParameterIsNotNull, parameter activity
       at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:4463)
       at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:4482)
       at android.app.ActivityThread.-wrap6(ActivityThread.java)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1640)
       at android.os.Handler.dispatchMessage(Handler.java:105)
       at android.os.Looper.loop(Looper.java:156)
       at android.app.ActivityThread.main(ActivityThread.java:6617)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:942)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:832)

Have tried to debug the app, am not getting much information what is causing the error, anyone know what could be causing this and how to fix it? Have tried to research am not getting much information

the Kotlin code generated by the app

package com.example.app

import io.flutter.embedding.android.FlutterActivity

class MainActivity: FlutterActivity() {
}

And another crash error

Caused by java.lang.IllegalArgumentException: Parameter specified as non-null is null: method kotlin.jvm.internal.Intrinsics.checkParameterIsNotNull, parameter activity
       at com.lyokone.location.FlutterLocationService.setActivity(FlutterLocationService.kt)
       at com.lyokone.location.LocationPlugin.deinitialize(LocationPlugin.java:121)
       at com.lyokone.location.LocationPlugin.detachActivity(LocationPlugin.java:56)
       at com.lyokone.location.LocationPlugin.onDetachedFromActivity(LocationPlugin.java:69)
       at io.flutter.embedding.engine.FlutterEngineConnectionRegistry.detachFromActivity(FlutterEngineConnectionRegistry.java:389)
       at io.flutter.embedding.android.FlutterActivityAndFragmentDelegate.onDetach(FlutterActivityAndFragmentDelegate.java:556)
       at io.flutter.embedding.android.FlutterActivity.release(FlutterActivity.java:587)
       at io.flutter.embedding.android.FlutterActivity.onDestroy(FlutterActivity.java:608)
       at android.app.Activity.performDestroy(Activity.java:7136)
       at android.app.Instrumentation.callActivityOnDestroy(Instrumentation.java:1158)
       at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:4450)
       at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:4482)
       at android.app.ActivityThread.-wrap6(ActivityThread.java)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1640)
       at android.os.Handler.dispatchMessage(Handler.java:105)
       at android.os.Looper.loop(Looper.java:156)
       at android.app.ActivityThread.main(ActivityThread.java:6617)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:942)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:832)
1 Answers
Related