Unverified Commit 61bce1d8 authored by Christopher Fujino's avatar Christopher Fujino Committed by GitHub

[flutter_tools] remove non-null check from AndroidValidator (#90090)

parent 2f9df031
......@@ -202,7 +202,6 @@ class AndroidValidator extends DoctorValidator {
if (androidSdkLatestVersion.sdkLevel < kAndroidSdkMinVersion || androidSdkLatestVersion.buildToolsVersion < kAndroidSdkBuildToolsMinVersion) {
messages.add(ValidationMessage.error(
_userMessages.androidSdkBuildToolsOutdated(
_androidSdk!.sdkManagerPath!,
kAndroidSdkMinVersion,
kAndroidSdkBuildToolsMinVersion.toString(),
_platform,
......@@ -458,7 +457,7 @@ class AndroidLicenseValidator extends DoctorValidator {
return exitCode == 0;
} on ProcessException catch (e) {
throwToolExit(_userMessages.androidCannotRunSdkManager(
_androidSdk.sdkManagerPath!,
_androidSdk.sdkManagerPath ?? '',
e.toString(),
_platform,
));
......
......@@ -117,7 +117,7 @@ class UserMessages {
'Android sdkmanager tool was found, but failed to run ($sdkManagerPath): "$error".\n'
'Try re-installing or updating your Android SDK,\n'
'visit ${_androidSdkInstallUrl(platform)} for detailed instructions.';
String androidSdkBuildToolsOutdated(String managerPath, int sdkMinVersion, String buildToolsMinVersion, Platform platform) =>
String androidSdkBuildToolsOutdated(int sdkMinVersion, String buildToolsMinVersion, Platform platform) =>
'Flutter requires Android SDK $sdkMinVersion and the Android BuildTools $buildToolsMinVersion\n'
'To update the Android SDK visit ${_androidSdkInstallUrl(platform)} for detailed instructions.';
String get androidMissingCmdTools => 'cmdline-tools component is missing\n'
......
......@@ -386,7 +386,6 @@ Review licenses that have not been accepted (y/N)?
..latestVersion = sdkVersion;
final String errorMessage = UserMessages().androidSdkBuildToolsOutdated(
sdk.sdkManagerPath,
kAndroidSdkMinVersion,
kAndroidSdkBuildToolsMinVersion.toString(),
FakePlatform(),
......
......@@ -27,7 +27,7 @@ void main() {
_checkInstallationURL((Platform platform) => userMessages.androidSdkInstallHelp(platform));
_checkInstallationURL((Platform platform) => userMessages.androidMissingSdkManager('/', platform));
_checkInstallationURL((Platform platform) => userMessages.androidCannotRunSdkManager('/', '', platform));
_checkInstallationURL((Platform platform) => userMessages.androidSdkBuildToolsOutdated('/', 0, '', platform));
_checkInstallationURL((Platform platform) => userMessages.androidSdkBuildToolsOutdated(0, '', platform));
_checkInstallationURL((Platform platform) => userMessages.androidStudioInstallation(platform));
});
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment