diff --git a/lib/sdk-installer.js b/lib/sdk-installer.js index e6fbf75cd..c57dea955 100644 --- a/lib/sdk-installer.js +++ b/lib/sdk-installer.js @@ -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) { diff --git a/src/sdk-installer.ts b/src/sdk-installer.ts index 0fd55c8bc..164fb3953 100644 --- a/src/sdk-installer.ts +++ b/src/sdk-installer.ts @@ -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"`);