Share an android debug mode. When waiting for debugger occurs, it will shut down and use a clever solution, androiddebugger.
When android studio is used to develop programs, sometimes the waiting for debugger gets stuck on the interface and the software cannot run properly. Many netizens have shared some solutions, such:
1. Open cmd and enter the command line. In the directory where adb is located, run adb kill-server and adb start-server successively.
2. Open cmd and go to the command line. Enter netstat-ano | findstr "5037", find the PID of adb.exe and Android Studio, and delete it.
3. Restart your computer and phone.
However, I have used the above methods and have not solved the problem of waiting for debugger getting stuck on the interface. Instead of using the debug mode, I compile the app using the run method (see figure 1 ), after the app starts normally, select Attach debugger to Android process (see figure 2). the android studio will pop up a form containing the app package name (3), and click OK, breakpoint debugging is also possible. for more information, see Figure 4.
,
Figure 1 Figure 2
Figure 3 Figure 4