Skip to content

Allow using Android SDK 27 #3313

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 10, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion lib/android-tools-info.ts
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@ import { appendZeroesToVersion } from './common/helpers';

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

this.$logger.trace(`Selected AppCompat version is: ${selectedAppCompatVersion}`);