-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Description
There have been some reports of the flutter daemon command (which IDEs use to maintain a list of available devices) crashing after some period of time (this was the cause of both Dart-Code/Dart-Code#4510, Dart-Code/Dart-Code#4475).
In a log provided by @guidezpl, there is this:
[9:46:07 PM] [FlutterDaemon] [Info] <== [{"event":"daemon.logMessage","params":{"level":"error","message":"Unable to run \"adb\", check your Android SDK installation and ANDROID_SDK_ROOT environment variable: /Users/plg/Library/Android/sdk/platform-tools/adb"}}]
[9:46:07 PM] [FlutterDaemon] [Info] Process /Users/plg/Developer/flutter-dev/bin/flutter terminated! 1, null
The daemon sent this error message and then terminated with an exit code of 1. The origin of this message is here:
flutter/packages/flutter_tools/lib/src/android/android_device_discovery.dart
Lines 74 to 79 in bea17cc
| } on ProcessException catch (exception) { | |
| throwToolExit( | |
| 'Unable to run "adb", check your Android SDK installation and ' | |
| '$kAndroidSdkRoot environment variable: ${exception.executable}', | |
| ); | |
| } |
It's not clear why this error is occurring, but it would be useful to expand the error message to include additional information that might help. For example, the exception message, exitCode and the stackTrace might help a) understand what this failure actually was, and b) what the code was actually running adb for.