Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 131deb4

Browse files
committedJan 10, 2018
Use latest available appCompat version
The current CLI logic finds appCompat version that matches the selected SDK version. However, the latest appCompat version is 26.0.0-alpha, so in case we have Android SDK 27, we are unable to find matchin appCompat. In order to resolve the issue and allow using Android SDK 27, get latest available appCompat version when there's no matching one.
1 parent b018c9c commit 131deb4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed
 

‎lib/android-tools-info.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,10 @@ export class AndroidToolsInfo implements IAndroidToolsInfo {
306306
if (this.androidHome && requiredAppCompatRange) {
307307
const pathToAppCompat = path.join(this.androidHome, "extras", "android", "m2repository", "com", "android", "support", "appcompat-v7");
308308
selectedAppCompatVersion = this.getMatchingDir(pathToAppCompat, requiredAppCompatRange);
309+
if (!selectedAppCompatVersion) {
310+
// get latest matching version, as there's no available appcompat versions for latest SDK versions.
311+
selectedAppCompatVersion = this.getMatchingDir(pathToAppCompat, "*");
312+
}
309313
}
310314

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

0 commit comments

Comments
 (0)
Please sign in to comment.