Skip to content

Commit 1fef06a

Browse files
authored
Install platforms for the specified api level (#384)
* Install platforms for the specified api level * Fix typo
1 parent d8da5b6 commit 1fef06a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/sdk-installer.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ function installAndroidSdk(apiLevel, target, arch, channelId, emulatorBuild, ndk
7070
// accept all Android SDK licenses
7171
yield exec.exec(`sh -c \\"yes | sdkmanager --licenses > /dev/null"`);
7272
console.log('Installing latest build tools, platform tools, and platform.');
73-
yield exec.exec(`sh -c \\"sdkmanager --install 'build-tools;${BUILD_TOOLS_VERSION}' platform-tools > /dev/null"`);
73+
yield exec.exec(`sh -c \\"sdkmanager --install 'build-tools;${BUILD_TOOLS_VERSION}' platform-tools 'platforms;android-${apiLevel}'> /dev/null"`);
7474
console.log('Installing latest emulator.');
7575
yield exec.exec(`sh -c \\"sdkmanager --install emulator --channel=${channelId} > /dev/null"`);
7676
if (emulatorBuild) {

src/sdk-installer.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ export async function installAndroidSdk(apiLevel: string, target: string, arch:
4343

4444
console.log('Installing latest build tools, platform tools, and platform.');
4545

46-
await exec.exec(`sh -c \\"sdkmanager --install 'build-tools;${BUILD_TOOLS_VERSION}' platform-tools > /dev/null"`);
46+
await exec.exec(`sh -c \\"sdkmanager --install 'build-tools;${BUILD_TOOLS_VERSION}' platform-tools 'platforms;android-${apiLevel}'> /dev/null"`);
4747

4848
console.log('Installing latest emulator.');
4949
await exec.exec(`sh -c \\"sdkmanager --install emulator --channel=${channelId} > /dev/null"`);

0 commit comments

Comments
 (0)