Replace ANDROID_HOME user messages with ANDROID_SDK_ROOT (#59867)

This commit is contained in:
Jenn Magder
2020-06-22 18:43:04 -07:00
committed by GitHub
parent 9470b9e2ce
commit 6a2bc2617e
11 changed files with 23 additions and 21 deletions

View File

@@ -690,8 +690,8 @@ String get adbPath {
if (androidHome == null) {
throw const DeviceException(
'The ANDROID_SDK_ROOT and ANDROID_HOME environment variables are '
'missing. At least one of these variables must point to the Android '
'The ANDROID_SDK_ROOT environment variable is '
'missing. The variable must point to the Android '
'SDK directory containing platform-tools.'
);
}

View File

@@ -105,7 +105,7 @@ String get _androidHome {
final String androidHome = Platform.environment['ANDROID_HOME'] ??
Platform.environment['ANDROID_SDK_ROOT'];
if (androidHome == null || androidHome.isEmpty) {
throw Exception('Unset env flag: `ANDROID_HOME` or `ANDROID_SDK_ROOT`.');
throw Exception('Environment variable `ANDROID_SDK_ROOT` is not set.');
}
return androidHome;
}