Issue 1:
As said in android's doc (https://developer.android.com/studio/command-line/variables), ANDROID_HOME is deprecated and should migrate to ANDROID_SDK_ROOT.

Issue 2:
This weekend I was providing assistance as @sobrienpdx tried to install Flutter on a brand new Mac laptop. After installing xcode, but not yet running it for the first time, Flutter Doctor produced the following output:

$ flutter doctor

Agreeing to the Xcode/iOS license requires admin privileges, please run “sudo xcodebuild -license” and then retry this command.

Building flutter tool...
Doctor summary (to see all details, run flutter doctor -v):

Oops; flutter has exited unexpectedly.
Sending crash report to Google.
Error executing simctl: 69

Agreeing to the Xcode/iOS license requires admin privileges, please run “sudo xcodebuild -license” and then retry this command.

Failed to send crash report. Server responded with HTTP status code 400
Crash report written to .../flutter_01.log;
please let us know at https://github.com/flutter/flutter/issues.
$

Steps to Reproduce

(This is my best recollection of how the problem arose; launching xcode for the first time fixed the problem so I can't verify that this is a correct repro)

Acquire a fresh MacOS computer that has not yet had xcode run on it.

Download and install xcode using the App store, but do not open it.

Download and install Flutter.

Run "flutter doctor".

Logs

Contents of flutter_01.log:

Flutter crash report; please file at https://github.com/flutter/flutter/issues.

command

flutter doctor

exception

VersionCheckError: VersionCheckError: Command exited with code 69: git log -n 1 --pretty=format:%ad --date=iso

Standard error:

Agreeing to the Xcode/iOS license requires admin privileges, please run “sudo xcodebuild -license” and then retry this command.

#0 _runSync (package:flutter_tools/src/version.dart:491:5)
#1 FlutterVersion._latestGitCommitDate (package:flutter_tools/src/version.dart:129:12)
#2 FlutterVersion.frameworkCommitDate (package:flutter_tools/src/version.dart:120:37)
#3 FlutterVersion.frameworkDate (package:flutter_tools/src/version.dart:83:31)
#4 _FlutterValidator.validate (package:flutter_tools/src/doctor.dart:398:45)
<asynchronous suspension>
#5 Doctor.startValidatorTasks (package:flutter_tools/src/doctor.dart:105:56)
#6 Doctor.diagnose (package:flutter_tools/src/doctor.dart:183:42)
<asynchronous suspension>
#7 DoctorCommand.runCommand (package:flutter_tools/src/commands/doctor.dart:29:39)
<asynchronous suspension>
#8 FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:372:18)
#9 _asyncThenWrapperHelper.<anonymous closure> (dart:async/runtime/libasync_patch.dart:77:64)
#10 _rootRunUnary (dart:async/zone.dart:1132:38)
#11 _CustomZone.runUnary (dart:async/zone.dart:1029:19)
#12 _FutureListener.handleValue (dart:async/future_impl.dart:129:18)
#13 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:642:45)
#14 Future._propagateToListeners (dart:async/future_impl.dart:671:32)
#15 Future._complete (dart:async/future_impl.dart:476:7)
#16 _SyncCompleter.complete (dart:async/future_impl.dart:51:12)
#17 _AsyncAwaitCompleter.complete.<anonymous closure> (dart:async/runtime/libasync_patch.dart:33:20)
#18 _rootRun (dart:async/zone.dart:1124:13)
#19 _CustomZone.run (dart:async/zone.dart:1021:19)
#20 _CustomZone.bindCallback.<anonymous closure> (dart:async/zone.dart:947:23)
#21 _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
#22 _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
#23 _runPendingImmediateCallback (dart:isolate/runtime/libisolate_patch.dart:115:13)
#24 _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:172:5)

flutter doctor

encountered exception: VersionCheckError: Command exited with code 69: git log -n 1 --pretty=format:%ad --date=iso
Standard error:

Agreeing to the Xcode/iOS license requires admin privileges, please run “sudo xcodebuild -license” and then retry this command.

#0 _runSync (package:flutter_tools/src/version.dart:491:5)
#1 FlutterVersion._latestGitCommitDate (package:flutter_tools/src/version.dart:129:12)
#2 FlutterVersion.frameworkCommitDate (package:flutter_tools/src/version.dart:120:37)
#3 FlutterVersion.frameworkDate (package:flutter_tools/src/version.dart:83:31)
#4 _FlutterValidator.validate (package:flutter_tools/src/doctor.dart:398:45)
<asynchronous suspension>
#5 Doctor.startValidatorTasks (package:flutter_tools/src/doctor.dart:105:56)
#6 Doctor.diagnose (package:flutter_tools/src/doctor.dart:183:42)
<asynchronous suspension>
#7 _doctorText.<anonymous closure> (package:flutter_tools/runner.dart:194:26)
#8 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:142:29)
<asynchronous suspension>
#9 _rootRun (dart:async/zone.dart:1124:13)
#10 _CustomZone.run (dart:async/zone.dart:1021:19)
#11 _runZoned (dart:async/zone.dart:1516:10)
#12 runZoned (dart:async/zone.dart:1463:12)
#13 AppContext.run (package:flutter_tools/src/base/context.dart:141:18)
<asynchronous suspension>
#14 _doctorText (package:flutter_tools/runner.dart:193:19)
<asynchronous suspension>
#15 _createLocalCrashReport (package:flutter_tools/runner.dart:171:32)
<asynchronous suspension>
#16 _handleToolError (package:flutter_tools/runner.dart:126:33)
<asynchronous suspension>
#17 run.<anonymous closure> (package:flutter_tools/runner.dart:63:20)
<asynchronous suspension>
#18 AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:142:29)
<asynchronous suspension>
#19 _rootRun (dart:async/zone.dart:1124:13)
#20 _CustomZone.run (dart:async/zone.dart:1021:19)
#21 _runZoned (dart:async/zone.dart:1516:10)
#22 runZoned (dart:async/zone.dart:1463:12)
#23 AppContext.run (package:flutter_tools/src/base/context.dart:141:18)
<asynchronous suspension>
#24 runInContext (package:flutter_tools/src/context_runner.dart:42:24)
<asynchronous suspension>
#25 run (package:flutter_tools/runner.dart:50:10)
#26 main (package:flutter_tools/executable.dart:52:9)
<asynchronous suspension>
#27 main (file:///Users/shaunnaobrien/development_tools/flutter/packages/flutter_tools/bin/flutter_tools.dart:8:3)
#28 _startIsolate.<anonymous closure> (dart:isolate/runtime/libisolate_patch.dart:287:32)
#29 _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:171:12)