|
@@ -39,9 +39,9 @@ function isDeviceRunning() {
|
39
|
39
|
function startEmulator() {
|
40
|
40
|
console.log(`Looking for avd...`);
|
41
|
41
|
const avdsRaw = exec.execSyncRead(`${process.env.ANDROID_HOME}/tools/bin/avdmanager list avd -c`);
|
42
|
|
- const avdName = /^.*package\.xml(\S+)$/m.exec(avdsRaw)[1];
|
|
42
|
+ const avdName = _.get(/^.*package\.xml(\S+)$/m.exec(avdsRaw), '1');
|
43
|
43
|
if (_.isEmpty(avdName)) {
|
44
|
|
- throw new Error(`Can't find avd to launch. Please create an avd first.`);
|
|
44
|
+ throw new Error(`\n\n\nCan't find avd to launch. Please create an avd first.\n\n\n`);
|
45
|
45
|
}
|
46
|
46
|
console.log(`found avd name: ${avdName}, Launching...`);
|
47
|
47
|
exec.execAsyncSilent(`${process.env.ANDROID_HOME}/tools/emulator -gpu host -no-audio @${avdName}`);
|