From 58e2fac8d2de1920c9545ca1b2939ed14b6ec2c6 Mon Sep 17 00:00:00 2001 From: Hugh Sanderson Date: Mon, 3 Jun 2024 21:23:09 +0800 Subject: [PATCH] Setup android_sdk before trying emulator --- tools/nme/src/CommandLineTools.hx | 1 + tools/nme/src/platforms/AndroidPlatform.hx | 1 + tools/nme/src/platforms/Platform.hx | 1 + 3 files changed, 3 insertions(+) diff --git a/tools/nme/src/CommandLineTools.hx b/tools/nme/src/CommandLineTools.hx index 5f7cad834..53f9989bc 100644 --- a/tools/nme/src/CommandLineTools.hx +++ b/tools/nme/src/CommandLineTools.hx @@ -1464,6 +1464,7 @@ class CommandLineTools generate(); case "emulator": + getHXCPPConfig(project); var android = new platforms.AndroidPlatform(project); android.emulator(words); diff --git a/tools/nme/src/platforms/AndroidPlatform.hx b/tools/nme/src/platforms/AndroidPlatform.hx index 10d79edc3..2e665b04c 100644 --- a/tools/nme/src/platforms/AndroidPlatform.hx +++ b/tools/nme/src/platforms/AndroidPlatform.hx @@ -407,6 +407,7 @@ class AndroidPlatform extends Platform return null; var out = ProcessHelper.getOutput(exe, [ "-list-avds"]); + out = out.filter( x -> x.indexOf("INFO")!=0 ); return out; } diff --git a/tools/nme/src/platforms/Platform.hx b/tools/nme/src/platforms/Platform.hx index aa9527b74..ec1a52a04 100644 --- a/tools/nme/src/platforms/Platform.hx +++ b/tools/nme/src/platforms/Platform.hx @@ -151,6 +151,7 @@ class Platform adbName = test; // Hmm - use relative path and hope it works } + Log.verbose('Using adb $adbName from ANDROID_SDK "${project.environment.get("ANDROID_SDK")}"'); adbFlags = []; if (project.targetFlags.exists("device"))