From 1037586dd71009b8f8cb8860f14ef35df6794799 Mon Sep 17 00:00:00 2001 From: Danny Tuppeny Date: Wed, 18 Apr 2018 16:20:15 +0100 Subject: [PATCH] Don't try to build emulators from empty output --- packages/flutter_tools/lib/src/android/android_emulator.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/flutter_tools/lib/src/android/android_emulator.dart b/packages/flutter_tools/lib/src/android/android_emulator.dart index 4ebea494c3..60fb12f94b 100644 --- a/packages/flutter_tools/lib/src/android/android_emulator.dart +++ b/packages/flutter_tools/lib/src/android/android_emulator.dart @@ -72,7 +72,7 @@ List getEmulatorAvds() { /// Parse the given `emulator -list-avds` output in [text], and fill out the given list /// of emulators by reading information from the relevant ini files. void extractEmulatorAvdInfo(String text, List emulators) { - for (String id in text.trim().split('\n')) { + for (String id in text.trim().split('\n').where((String l) => l != '')) { emulators.add(_createEmulator(id)); } }