Also update emulator. Add docs.

This commit is contained in:
Yang Chen
2019-11-09 20:23:29 +11:00
parent 108f020fac
commit 9fc21537b8
4 changed files with 91 additions and 12 deletions
+2 -2
View File
@@ -24,8 +24,8 @@ const BUILD_TOOLS_VERSION = '29.0.2';
function installAndroidSdk(apiLevel, target, arch) {
return __awaiter(this, void 0, void 0, function* () {
const sdkmangerPath = `${process.env.ANDROID_HOME}/tools/bin/sdkmanager`;
console.log('Installing build tools, platform tools, and platform.');
yield exec.exec(`bash -c \\"${sdkmangerPath} --install 'build-tools;${BUILD_TOOLS_VERSION}' platform-tools 'platforms;android-${apiLevel}' > /dev/null"`);
console.log('Installing latest build tools, platform tools, platform, and emulator.');
yield exec.exec(`bash -c \\"${sdkmangerPath} --install 'build-tools;${BUILD_TOOLS_VERSION}' platform-tools 'platforms;android-${apiLevel}' emulator > /dev/null"`);
console.log('Installing system images.');
yield exec.exec(`bash -c \\"${sdkmangerPath} --install 'system-images;android-${apiLevel};${target};${arch}' > /dev/null"`);
});