Android app only works in debug mode

Friends, my Android application runs in debug mode, even if I press the eclipse start button or launch it by touching its icon on the device. what will be the reason for this? Does anyone know about this?

+4
source share
3 answers

Does it work if you uninstall your application and click the eclipse launch button? If yes, this is probably the reason that the android stores some data in memory, even if you close the application, especially for static members or links that are not freed by GC. As part of debugging, you get a new instance of your application, and it works when you remove / install it. When you click the eclipse launch button, the application may not be installed again, and some data will be reused. You must carefully manage your application data. Read this article first

+2
source

A bit late, but maybe this can help someone.

Rebooting the device using adb worked for me, like this adb reboot launch

Rebooting the phone by itself did not work before

+1
source

I had the same problem and decided to do this as follows:

  • I deleted the application from the phone
  • ./adb kill-server
  • ./adb start-server

Now it works for me. Hope this helps.

0
source

All Articles