Skip to content

Commit

Permalink
Install platforms for the specified api level (#384)
Browse files Browse the repository at this point in the history
* Install platforms for the specified api level

* Fix typo
  • Loading branch information
joshrlesch committed Mar 27, 2024
1 parent d8da5b6 commit 1fef06a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/sdk-installer.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ function installAndroidSdk(apiLevel, target, arch, channelId, emulatorBuild, ndk
// accept all Android SDK licenses
yield exec.exec(`sh -c \\"yes | sdkmanager --licenses > /dev/null"`);
console.log('Installing latest build tools, platform tools, and platform.');
yield exec.exec(`sh -c \\"sdkmanager --install 'build-tools;${BUILD_TOOLS_VERSION}' platform-tools > /dev/null"`);
yield exec.exec(`sh -c \\"sdkmanager --install 'build-tools;${BUILD_TOOLS_VERSION}' platform-tools 'platforms;android-${apiLevel}'> /dev/null"`);
console.log('Installing latest emulator.');
yield exec.exec(`sh -c \\"sdkmanager --install emulator --channel=${channelId} > /dev/null"`);
if (emulatorBuild) {
Expand Down
2 changes: 1 addition & 1 deletion src/sdk-installer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export async function installAndroidSdk(apiLevel: string, target: string, arch:

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

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

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

0 comments on commit 1fef06a

Please sign in to comment.