Dolphin
Dolphin

Reputation: 38733

how to find the flutter crash reason in android studio

When I start debug my flutter(2.0.1) app in Android studio 4.2, the app start and crashed. there has no error log output, what should I do to find why the app crashed? this is the startup log(no error message):

This will generate a JSON format file containing all messages that 
need to be translated.
Launching lib/main.dart on iPhone 11 Pro in debug mode...
Running Xcode build...
Xcode build done.                                           16.8s

I run the run command:

 /Users/dolphin/source/cruise-open/.dart_tool/flutter_build/b649952ecb0be9dfc3fd2e301c2ba3d8/kernel_snapshot.d package:Cruise/main.dart
               [+1901 ms] ../../.pub-cache/hosted/pub.flutter-io.cn/video_player_platform_interface-2.2.0/lib/messages.dart:4:1: Error: A library can't opt out of null
safety by
               default, when using sound null safety.
               [   +1 ms] // @dart = 2.8
               [        ] ^^^^^^^^^^^^^^
               [  +35 ms] ../../.pub-cache/hosted/pub.flutter-io.cn/wakelock_platform_interface-0.1.0+1/lib/messages.dart:4:1: Error: A library can't opt out of null
safety by
               default, when using sound null safety.
               [        ] // @dart = 2.8
               [        ] ^^^^^^^^^^^^^^
               [  +71 ms] Error: Cannot run with sound null safety, because the following dependencies
               [        ] don't support null safety:
               [        ]  - package:shared_preferences
               [        ]  - package:timeago
               [        ]  - package:hive
               [        ]  - package:hive_flutter

but I already add null safety config:

enter image description here

Upvotes: 1

Views: 627

Answers (1)

Manjun Vasudevan
Manjun Vasudevan

Reputation: 286

Please run the app using the command

flutter run -v

This will give you complete verbose logging.

Upvotes: 4

Related Questions