diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/TryIt.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/TryIt.java index 440308b9ec..0ed6007ed2 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/TryIt.java +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.emulator/src/main/java/org.carbon.android.emulator/TryIt.java @@ -761,12 +761,14 @@ public class TryIt { try { processKillServer = processBuilderKillServer.start(); } catch (IOException ignored) { - // process works if restarted + System.out.println("If the device doesn't start properly, stop running the script and restart again"); } try { - processKillServer.waitFor(); + if (processKillServer != null) { + processKillServer.waitFor(); + } } catch (InterruptedException ignored) { - // can be continued + System.out.println("If the device doesn't start properly, stop running the script and restart again"); } }