flutter/packages/flutter_tools/test/general.shard/android
gaaclarke 66c8316f97
Android doctor: more robust canrun (#167489)
Fixes error found in rolling to google.

```
[☠] Android toolchain - develop for Android devices (the doctor check crashed)
    ✗ Due to an error, the doctor check did not complete. If the error message
      below is not helpful, please let us know about this issue at
      https://github.com/flutter/flutter/issues.
    ✗ type 'Null' is not a subtype of type 'String' of 'executable'
    • #0      LocalProcessManager.canRun
      (package:process/src/interface/local_process_manager.dart:124)
      #1      getEmulatorVersion
      (package:flutter_tools/src/android/android_workflow.dart:64)
      #2      AndroidValidator.validateImpl
      (package:flutter_tools/src/android/android_workflow.dart:200)
      #3      DoctorValidator.validate
      (package:flutter_tools/src/doctor_validator.dart:58)
      #4      Doctor.startValidatorTasks.<anonymous closure>
      (package:flutter_tools/src/doctor.dart:244)
      #5      asyncGuard.<anonymous closure>
      (package:flutter_tools/src/base/async_guard.dart:109)
      #6      _rootRun (dart:async/zone.dart:1525)
      #7      _CustomZone.run (dart:async/zone.dart:1422)
      #8      _runZoned (dart:async/zone.dart:2033)
      #9      runZonedGuarded (dart:async/zone.dart:2019)
      #10     runZoned (dart:async/zone.dart:1952)
      #11     asyncGuard (package:flutter_tools/src/base/async_guard.dart:106)
      #12     Doctor.startValidatorTasks
      (package:flutter_tools/src/doctor.dart:234)
      #13     Doctor.diagnose (package:flutter_tools/src/doctor.dart:372)
      #14     DoctorCommand.runCommand
      (package:flutter_tools/src/commands/doctor.dart:59)
      #15     FlutterCommand.verifyThenRunCommand
      (package:flutter_tools/src/runner/flutter_command.dart:1897)
      <asynchronous suspension>
      #16     FlutterCommand.run.<anonymous closure>
      (package:flutter_tools/src/runner/flutter_command.dart:1551)
      <asynchronous suspension>
      #17     AppContext.run.<anonymous closure>
      (package:flutter_tools/src/base/context.dart:154)
      <asynchronous suspension>
      #18     CommandRunner.runCommand (package:args/command_runner.dart:212)
      <asynchronous suspension>
      #19     FlutterCommandRunner.runCommand.<anonymous closure>
      (package:flutter_tools/src/runner/flutter_command_runner.dart:501)
      <asynchronous suspension>
      #20     AppContext.run.<anonymous closure>
      (package:flutter_tools/src/base/context.dart:154)
      <asynchronous suspension>
      #21     FlutterCommandRunner.runCommand
      (package:flutter_tools/src/runner/flutter_command_runner.dart:438)
      <asynchronous suspension>
      #22     run.<anonymous closure>.<anonymous closure>
      (package:flutter_tools/runner.dart:98)
      <asynchronous suspension>
      #23     AppContext.run.<anonymous closure>
      (package:flutter_tools/src/base/context.dart:154)
      <asynchronous suspension>
      #24     AppContext.run.<anonymous closure>
      (package:flutter_tools/src/base/context.dart:154)
      <asynchronous suspension>
      #25     run (package:mobile.flutter.cli/flutter_tools.dart:106)
      <asynchronous suspension>
      #26     main (google3:///mobile/flutter/cli/bin/cli_usage_aot.dart:4)
```

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
2025-04-21 18:10:20 +00:00
..
migration Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
adb_log_reader_test.dart 🔊 [tool] Add a wirelessly connected device name as displayName (#160497) 2025-01-10 20:51:34 +00:00
android_device_discovery_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
android_device_port_forwarder_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
android_device_start_test.dart Remove the last vestiges of null-unsafety in flutter_tools. (#164026) 2025-02-27 16:31:22 +00:00
android_device_test.dart [flutter_tool] Handle RPCErrorKind.kConnectionDisposed (#164299) 2025-03-27 08:51:38 +00:00
android_emulator_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
android_gradle_builder_test.dart flutter build aar regenerates tooling between each build-mode step (#162705) 2025-02-06 17:03:02 +00:00
android_install_test.dart 🐛 [tool] Installs the APK regardless of version (#160432) 2024-12-30 02:26:27 +00:00
android_project_migration_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
android_sdk_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
android_studio_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
android_studio_validator_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
android_workflow_test.dart Android doctor: more robust canrun (#167489) 2025-04-21 18:10:20 +00:00
build_validation_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
deferred_components_gen_snapshot_validator_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
deferred_components_prebuild_validator_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
gradle_errors_test.dart Add a gradle_errors.dartentry for missing NDK source.properties file (#167320) 2025-04-17 03:13:09 +00:00
gradle_find_bundle_test.dart [tool] Allow using archiveName in android bundle build (#162390) 2025-02-28 14:57:20 +00:00
gradle_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
gradle_utils_test.dart Add kotlin compatability to build file validation (#167143) 2025-04-18 16:32:08 +00:00
java_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00
template_test.dart Auto-format Framework (#160545) 2024-12-19 20:06:21 +00:00