Skip to content

fix: add android-36 api level and start up emulator with unknown target versions #5842

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion lib/common/mobile/android/android-emulator-services.ts
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ export class AndroidEmulatorServices
const minVersion = semver.coerce(AndroidVirtualDevice.MIN_ANDROID_VERSION);
const bestVersion = best && best.version && semver.coerce(best.version);

return bestVersion && semver.gte(bestVersion, minVersion) ? best : null;
return !bestVersion || semver.gte(bestVersion, minVersion) ? best : null;
}

private async waitForEmulatorBootToComplete(
Expand Down
1 change: 1 addition & 0 deletions lib/common/mobile/emulator-helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { injector } from "../yok";
export class EmulatorHelper implements Mobile.IEmulatorHelper {
// https://developer.android.com/guide/topics/manifest/uses-sdk-element
public mapAndroidApiLevelToVersion = {
"android-36": "16.0.0",
"android-35": "15.0.0",
"android-34": "14.0.0",
"android-33": "13.0.0",
Expand Down
1 change: 1 addition & 0 deletions packages/doctor/src/android-tools-info.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export class AndroidToolsInfo implements NativeScriptDoctor.IAndroidToolsInfo {
"android-33",
"android-34",
"android-35",
"android-36",
];

const isRuntimeVersionLessThan = (targetVersion: string) => {
Expand Down
1 change: 1 addition & 0 deletions packages/doctor/test/android-tools-info.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ describe("androidToolsInfo", () => {
"android-33",
"android-34",
"android-35",
"android-36",
];
}
},
Expand Down