2

Android Studio, when debugging, installs and launches the app, but it stays on "Waiting For Debugger", while Android Studio never connects to the app. This happens on both wireless and wired connections (USB/WiFi), but only on this device.

I'm running Windows 10, trying to debug an app through Android Studio on a Prestigio X Pro (app is developed for internal use at a company and these are the phones that will be running the app). Most of the time, I have to debug 5-10 times from Studio to actually get past the waiting stage, since it doesn't connect. The times that it works seem random, but it eventually goes through after a few minutes of trying.

When attempting to debug, I get output from Android studio like this:

09/25 12:45:07: Launching 'app' on Prestigio PSP7546DUO.
$ adb shell am start -n "com.my.app.debug/com.my.app.ui.LoginActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -D
Waiting for application to come online: com.my.app.debug.test | com.my.app.debug
Waiting for application to come online: com.my.app.debug.test | com.my.app.debug

//The "waiting for application" continues for around 15 seconds

Waiting for application to come online: com.my.app.debug.test | com.my.app.debug
Could not connect to remote process. Aborting debug session.

I also notice that in the Event Log for Android Studio, it gives this:

12:43   Executing tasks: [:app:assembleDebug] in project D:\Sources\MyAndroidApp
12:44   Gradle build finished in 10 s 385 ms
12:44   Install successfully finished in 11 s 803 ms.
12:44   Received pid (13328) does not match client pid (808530995)
12:44   Executing tasks: [:app:assembleDebug] in project D:\Sources\MyAndroidApp
12:44   Gradle build finished in 3 s 400 ms
12:44   Install successfully finished in 1 s 702 ms.: App restart successful without requiring a re-install.
12:44   Received pid (13406) does not match client pid (1697985587)
12:45   Executing tasks: [:app:assembleDebug] in project D:\Sources\MyAndroidApp
12:45   Gradle build finished in 3 s 380 ms
12:45   Install successfully finished in 1 s 391 ms.: App restart successful without requiring a re-install.
12:45   Received pid (13481) does not match client pid (962671667)

What I'd expect is that I'd start debugging, and after a second or two it would come online and continue with the app. Console output when this happens is something like this:

09/25 12:48:53: Launching 'app' on Prestigio PSP7546DUO.
$ adb shell am start -n "com.my.app.debug/com.my.app.ui.LoginActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -D
Waiting for application to come online: com.my.app.debug.test | com.my.app.debug
Waiting for application to come online: com.my.app.debug.test | com.my.app.debug
Waiting for application to come online: com.my.app.debug.test | com.my.app.debug
Connecting to com.my.app.debug
Connected to the target VM, address: 'localhost:8601', transport: 'socket'

This isn't happening, and I'm not entirely sure why. Any help would be appreciated.

Riccorbypro
  • 33
  • 2
  • 5

0 Answers0