Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
242 views
in Technique[技术] by (71.8m points)

Flutter Android application crashes in release mode

My app is working fine in debug mode, but when I open it in release mode, it crashes straight after it launchs. I tryed flutter run --profile and it gives me error :

W/FlutterEnginePluginRegistry(10441): Attempted to register plugin (com.jhomlala.alice.Alice@ee9a6b3) but it was already registered with this FlutterEngine (io.flutter.embedding.engine.FlutterEngine@c07bc22).
W/FlutterEnginePluginRegistry(10441): Attempted to register plugin (de.lschmierer.android_play_install_referrer.AndroidPlayInstallReferrerPlugin@bb8b470) but it was already registered with this FlutterEngine (io.flutter.embedding.engine.FlutterEngine@c07bc22).
W/FlutterEnginePluginRegistry(10441): Attempted to register plugin (com.jhomlala.better_player.BetterPlayerPlugin@33f23e9) but it was already registered with this FlutterEngine (io.flutter.embedding.engine.FlutterEngine@c07bc22).
W/FlutterEnginePluginRegistry(10441): Attempted to register plugin (io.flutter.plugins.camera.CameraPlugin@e09786e) but it was already registered with this FlutterEngine (io.flutter.embedding.engine.FlutterEngine@c07bc22).
W/FlutterEnginePluginRegistry(10441): Attempted to register plugin (io.flutter.plugins.firebase.core.FlutterFirebaseCorePlugin@fcdfb0f) but it was already registered with this FlutterEngine (io.flutter.embedding.engine.FlutterEngine@c07bc22).
W/FlutterEnginePluginRegistry(10441): Attempted to register plugin (io.flutter.plugins.firebasemessaging.FirebaseMessagingPlugin@9cca79c) but it was already registered with this FlutterEngine (io.flutter.embedding.engine.FlutterEngine@c07bc22).
W/FlutterEnginePluginRegistry(10441): Attempted to register plugin (io.flutter.plugins.firebase.firebaseremoteconfig.FirebaseRemoteConfigPlugin@5dd15a5) but it was already registered with this FlutterEngine (io.flutter.embedding.engine.FlutterEngine@c07bc22).
E/AndroidRuntime(10441): FATAL EXCEPTION: main
E/AndroidRuntime(10441): Process: com.$app_name, PID: 10441
E/AndroidRuntime(10441): java.lang.NullPointerException: Attempt to invoke interface method 'void io.flutter.plugin.common.BinaryMessenger.setMessageHandler(java.lang.String, io.flutter.plugin.common.BinaryMessenger$BinaryMessageHandler)' on a null object reference
E/AndroidRuntime(10441):        at io.flutter.plugin.common.MethodChannel.setMethodCallHandler(MethodChannel.java:119)
E/AndroidRuntime(10441):        at com.cks.flutter_hls_parser.FlutterHlsParserPlugin.registerWith(FlutterHlsParserPlugin.java:14)
E/AndroidRuntime(10441):        at io.flutter.plugins.GeneratedPluginRegistrant.registerWith(GeneratedPluginRegistrant.java:25)
E/AndroidRuntime(10441):        at com.$app_name.MainActivity.configureFlutterEngine(MainActivity.kt:29)
E/AndroidRuntime(10441):        at io.flutter.embedding.android.FlutterFragment.configureFlutterEngine(FlutterFragment.java:950)
E/AndroidRuntime(10441):        at io.flutter.embedding.android.FlutterActivityAndFragmentDelegate.onAttach(FlutterActivityAndFragmentDelegate.java:181)
E/AndroidRuntime(10441):        at io.flutter.embedding.android.FlutterFragment.onAttach(FlutterFragment.java:582)
E/AndroidRuntime(10441):        at androidx.fragment.app.Fragment.performAttach(Fragment.java:2574)
E/AndroidRuntime(10441):        at androidx.fragment.app.FragmentManagerImpl.moveToState(FragmentManagerImpl.java:828)
E/AndroidRuntime(10441):        at androidx.fragment.app.FragmentTransition.addToFirstInLastOut(FragmentTransition.java:1197)
E/AndroidRuntime(10441):        at androidx.fragment.app.FragmentTransition.calculateFragments(FragmentTransition.java:1080)
E/AndroidRuntime(10441):        at androidx.fragment.app.FragmentTransition.startTransitions(FragmentTransition.java:119)
E/AndroidRuntime(10441):        at androidx.fragment.app.FragmentManagerImpl.executeOpsTogether(FragmentManagerImpl.java:1866)
E/AndroidRuntime(10441):        at androidx.fragment.app.FragmentManagerImpl.removeRedundantOperationsAndExecute(FragmentManagerImpl.java:1824)
E/AndroidRuntime(10441):        at androidx.fragment.app.FragmentManagerImpl.execPendingActions(FragmentManagerImpl.java:1727)
E/AndroidRuntime(10441):        at androidx.fragment.app.FragmentManagerImpl.dispatchStateChange(FragmentManagerImpl.java:2663)
E/AndroidRuntime(10441):        at androidx.fragment.app.FragmentManagerImpl.dispatchActivityCreated(FragmentManagerImpl.java:2613)
E/AndroidRuntime(10441):        at androidx.fragment.app.FragmentController.dispatchActivityCreated(FragmentController.java:246)
E/AndroidRuntime(10441):        at androidx.fragment.app.FragmentActivity.onStart(FragmentActivity.java:542)
E/AndroidRuntime(10441):        at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1392)
E/AndroidRuntime(10441):        at android.app.Activity.performStart(Activity.java:7252)
E/AndroidRuntime(10441):        at android.app.ActivityThread.handleStartActivity(ActivityThread.java:2970)
E/AndroidRuntime(10441):        at android.app.servertransaction.TransactionExecutor.performLifecycleSequence(TransactionExecutor.java:180)
E/AndroidRuntime(10441):        at android.app.servertransaction.TransactionExecutor.cycleToPath(TransactionExecutor.java:165)
E/AndroidRuntime(10441):        at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:142)
E/AndroidRuntime(10441):        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:70)
E/AndroidRuntime(10441):        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1831)
E/AndroidRuntime(10441):        at android.os.Handler.dispatchMessage(Handler.java:106)
E/AndroidRuntime(10441):        at android.os.Looper.loop(Looper.java:201)
E/AndroidRuntime(10441):        at android.app.ActivityThread.main(ActivityThread.java:6810)
E/AndroidRuntime(10441):        at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(10441):        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:547)
E/AndroidRuntime(10441):        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:873)
failed to connect to http://127.0.0.1:41035/7ZivvIyP_bM=/

I also tryed this flutter build apk --no-shrink and this flutter pub cache repair but it did not help. How can I fix my problem? Thanks in advance for any help.

question from:https://stackoverflow.com/questions/65602842/flutter-android-application-crashes-in-release-mode

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...