Support running on linux without hardware accleration.

This commit is contained in:
Yang Chen
2020-03-27 00:19:17 +11:00
committed by Yang
parent 490f28e17c
commit 345ace6178
8 changed files with 68 additions and 41 deletions
+4
View File
@@ -33,6 +33,10 @@ function launchEmulator(apiLevel, target, arch, profile, emulatorOptions, disabl
}
// start emulator
console.log('Starting emulator.');
// turn off hardware acceleration on Linux
if (process.platform === 'linux') {
emulatorOptions += '-accel off';
}
yield exec.exec(`sh -c \\"${process.env.ANDROID_HOME}/emulator/emulator -avd test ${emulatorOptions} &"`, [], {
listeners: {
stderr: (data) => {