Skip to content

Commit 9879529

Browse files
Merge pull request #26 from NativeScript/vladimirov/android-27
Add Android SDK 27 as verified
2 parents 22aa3c5 + 36d0a60 commit 9879529

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/android-tools-info.ts

+5-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import * as path from "path";
99

1010
export class AndroidToolsInfo implements NativeScriptDoctor.IAndroidToolsInfo {
1111
private static ANDROID_TARGET_PREFIX = "android";
12-
private static SUPPORTED_TARGETS = ["android-17", "android-18", "android-19", "android-21", "android-22", "android-23", "android-24", "android-25", "android-26"];
12+
private static SUPPORTED_TARGETS = ["android-17", "android-18", "android-19", "android-21", "android-22", "android-23", "android-24", "android-25", "android-26", "android-27"];
1313
private static MIN_REQUIRED_COMPILE_TARGET = 22;
1414
private static REQUIRED_BUILD_TOOLS_RANGE_PREFIX = ">=23";
1515
private static VERSION_REGEX = /((\d+\.){2}\d+)/;
@@ -271,6 +271,10 @@ export class AndroidToolsInfo implements NativeScriptDoctor.IAndroidToolsInfo {
271271
if (this.androidHome && requiredAppCompatRange) {
272272
const pathToAppCompat = path.join(this.androidHome, "extras", "android", "m2repository", "com", "android", "support", "appcompat-v7");
273273
selectedAppCompatVersion = this.getMatchingDir(pathToAppCompat, requiredAppCompatRange);
274+
if (!selectedAppCompatVersion) {
275+
// get latest matching version, as there's no available appcompat versions for latest SDK versions.
276+
selectedAppCompatVersion = this.getMatchingDir(pathToAppCompat, "*");
277+
}
274278
}
275279

276280
return selectedAppCompatVersion;

0 commit comments

Comments
 (0)