Skip to content

Commit 1ba7237

Browse files
Update AndroidMode.java
1 parent b2133ff commit 1ba7237

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

mode/src/processing/mode/android/AndroidMode.java

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,8 +241,16 @@ public void handleRunEmulator(Sketch sketch, AndroidEditor editor,
241241
build.build("debug", "");
242242

243243
if (sdk.getEmulatorTool() == null) {
244-
System.out.println("Try to download the emulator using the SDK Manager...");
245-
sdk.downloadEmuOnDemand();
244+
// System.out.println("Try to download the emulator using the SDK Manager...");
245+
listener.statusNotice(AndroidMode.getTextString("android_mode.status.downloading_emulator"));
246+
boolean emulatorInstallationSucceded = sdk.downloadEmuOnDemand();
247+
if (!emulatorInstallationSucceded) {
248+
SketchException emulatorInstallationErrorException = new SketchException(AndroidMode.getTextString("android_mode.error.emulator_installation_failed"));
249+
emulatorInstallationErrorException.hideStackTrace();
250+
throw emulatorInstallationErrorException;
251+
} else {
252+
System.out.println(AndroidMode.getTextString("android_mode.status.downloading_emulator_successful"));
253+
}
246254
}
247255

248256
boolean avd = AVD.ensureProperAVD(editor, this, sdk, build.isWear());

0 commit comments

Comments
 (0)