mirror of
https://github.com/reactivecircus/android-emulator-runner.git
synced 2026-09-03 19:09:32 +00:00
Fix sdk license issue with API 28+ system images on Linux.
This commit is contained in:
@@ -16,7 +16,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const exec = __importStar(require("@actions/exec"));
|
||||
const EMULATOR_BOOT_TIMEOUT_SECONDS = 300;
|
||||
const EMULATOR_BOOT_TIMEOUT_SECONDS = 600;
|
||||
/**
|
||||
* Creates and launches a new AVD instance with the specified configurations.
|
||||
*/
|
||||
@@ -99,7 +99,7 @@ function waitForDevice() {
|
||||
}
|
||||
}
|
||||
catch (error) {
|
||||
console.log(error.message);
|
||||
console.warn(error.message);
|
||||
}
|
||||
if (attempts < maxAttemps) {
|
||||
yield delay(retryInterval * 1000);
|
||||
|
||||
@@ -35,7 +35,11 @@ function installAndroidSdk(apiLevel, target, arch, emulatorBuild) {
|
||||
yield exec.exec(`sudo rm -f commandlinetools.zip`);
|
||||
// add paths for commandline-tools and platform-tools
|
||||
core.addPath(`${process.env.ANDROID_HOME}/cmdline-tools/tools:${process.env.ANDROID_HOME}/cmdline-tools/tools/bin:${process.env.ANDROID_HOME}/platform-tools`);
|
||||
yield exec.exec(`sh -c \\"sudo chmod -R 777 ${process.env.ANDROID_HOME}"`);
|
||||
// additional permission and license requirements for Linux
|
||||
if (!isOnMac) {
|
||||
yield exec.exec(`sh -c \\"sudo chmod -R 777 ${process.env.ANDROID_HOME}"`);
|
||||
yield exec.exec(`sh -c \\"echo -e '\n84831b9409646a918e30573bab4c9c91346d8abd' > ${process.env.ANDROID_HOME}/licenses/android-sdk-preview-license"`);
|
||||
}
|
||||
console.log('Installing latest build tools, platform tools, and platform.');
|
||||
yield exec.exec(`sh -c \\"sdkmanager --install 'build-tools;${BUILD_TOOLS_VERSION}' platform-tools 'platforms;android-${apiLevel}' > /dev/null"`);
|
||||
if (emulatorBuild) {
|
||||
|
||||
Reference in New Issue
Block a user