mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00
be more lenient when looking for matching android sdk components (#3830)
* be more lenient when looking for matching android sdk components * use a null aware operator
This commit is contained in:
parent
5b3a4e5554
commit
45db865079
@ -147,10 +147,7 @@ class AndroidSdk {
|
||||
.toList();
|
||||
}
|
||||
|
||||
// Here we match up platforms with cooresponding build-tools. If we don't
|
||||
// have a match, we don't return anything for that platform version. So if
|
||||
// the user only has 'android-22' and 'build-tools/19.0.0', we don't find
|
||||
// an Android sdk.
|
||||
// Match up platforms with the best cooresponding build-tools.
|
||||
_sdkVersions = platforms.map((String platformName) {
|
||||
int platformVersion;
|
||||
|
||||
@ -167,6 +164,8 @@ class AndroidSdk {
|
||||
return version.major == platformVersion;
|
||||
}).toList());
|
||||
|
||||
buildToolsVersion ??= Version.primary(buildTools);
|
||||
|
||||
if (buildToolsVersion == null)
|
||||
return null;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user