From cfdc279a60f65bbd0750d67c7db96b31448a7357 Mon Sep 17 00:00:00 2001 From: Ely Alvarado Date: Sat, 19 May 2018 06:40:58 -0400 Subject: [PATCH] Update Android emulator path to support SDK Tools >=25.3.0 (#700) Update Android emulator path to support SDK Tools >=25.3.0 --- detox/src/devices/android/Emulator.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/detox/src/devices/android/Emulator.js b/detox/src/devices/android/Emulator.js index df50e6d898..4a89424b3f 100644 --- a/detox/src/devices/android/Emulator.js +++ b/detox/src/devices/android/Emulator.js @@ -10,7 +10,9 @@ const argparse = require('../../utils/argparse'); class Emulator { constructor() { - this.emulatorBin = path.join(Environment.getAndroidSDKPath(), 'tools', 'emulator'); + const newEmulatorPath = path.join(Environment.getAndroidSDKPath(), 'emulator', 'emulator'); + const oldEmulatorPath = path.join(Environment.getAndroidSDKPath(), 'tools', 'emulator'); + this.emulatorBin = fs.existsSync(newEmulatorPath) ? newEmulatorPath : oldEmulatorPath; } async listAvds() {