Commit 45db8650 authored by Devon Carew's avatar Devon Carew

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
parent 5b3a4e55
......@@ -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;
......
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