Paul Clapham wrote:Did you consider reading the exception to see what it said?

I googled and found out about LogCat..

I set LogCat up, and while the program was running in Debug, the log in LogCat didn't show anything unusual, but when I closed the Android Emulator window, it showed this :

[2011-07-26 21:18:33 - Logcat]device not found
com.android.ddmlib.AdbCommandRejectedException: device not found
at com.android.ddmlib.AdbHelper.setDevice(AdbHelper.java:736)
at com.android.ddmlib.AdbHelper.executeRemoteCommand(AdbHelper.java:373)
at com.android.ddmlib.Device.executeShellCommand(Device.java:284)
at com.android.ddmuilib.logcat.LogPanel$3.run(LogPanel.java:527)