Replace ANDROID_HOME user messages with ANDROID_SDK_ROOT (#59867)
This commit is contained in:
@@ -1113,7 +1113,7 @@ Map<String, String> _initGradleEnvironment() {
|
||||
? Platform.environment['ANDROID_SDK_ROOT']
|
||||
: Platform.environment['ANDROID_HOME'];
|
||||
if (androidSdkRoot == null || androidSdkRoot.isEmpty) {
|
||||
print('${red}Could not find Android SDK; set ANDROID_SDK_ROOT (or ANDROID_HOME).$reset');
|
||||
print('${red}Could not find Android SDK; set ANDROID_SDK_ROOT.$reset');
|
||||
exit(1);
|
||||
}
|
||||
return <String, String>{
|
||||
|
||||
@@ -94,7 +94,7 @@ reproduce a CI test failure locally.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
You must set the `ANDROID_HOME` or `ANDROID_SDK_ROOT` environment variable to run
|
||||
You must set `ANDROID_SDK_ROOT` environment variable to run
|
||||
tests on Android. If you have a local build of the Flutter engine, then you have
|
||||
a copy of the Android SDK at `.../engine/src/third_party/android_tools/sdk`.
|
||||
|
||||
|
||||
@@ -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.'
|
||||
);
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user