2

When I try to debug the app, the emulator sticks on "Waiting for debugger". Meanwhile, in the debug tab, it can be seen that AS is "waiting for application to come online". But after a moment shows "Could not connect to remote process. Aborting debug session". As a further attempt, after running the app normally, I try to "Attach Debugger to Android Process". "Choose Process" dialog is opened and the process on emulator is shown correctly, but the OK button is grayed out!

Android Studio version: 2020.3.1 patch 4: OS type and version: Windows 7 v6.1 Service Pack 1 Build: AI-203.7717.56.2031.7784292, 202110010236,

AI-203.7717.56.2031.7784292, JRE 11.0.10+0-b96-7249189x64 JetBrains s.r.o, OS Windows 7(amd64) v6.1 Service Pack 1, screens 1366.0x768.0

AS: Arctic Fox | 2020.3.1 Patch 3; Kotlin plugin: 203-1.6.0-release-798-AS7717.8; Android Gradle Plugin: 7.0.3; Gradle: 7.0.2; Gradle JDK: version 11.0.10; NDK: from local.properties: (not specified), latest from SDK: (not found); LLDB: pinned revision 3.1 not found, latest from SDK: (package not found); CMake: from local.properties: (not specified), latest from SDK: (not found), from PATH: (not found)Source: user_sentiment_feedback

I read and implemented all possible solutions in the web without any success. Still i encounter "Could not connect to remote process. Aborting debug session." This happens on all apps with all emulator and real phones.

5 Answers5

2

Disable USB debugging in the developer options and enabling it does the trick.

1

Seems a duplicate of Could not connect to remote process. Aborting debug session

Please check there for things you can try. In my case IntelliJ (which was also open concurrently) was interfering with ADB. Disabling Android plugin in IntelliJ solved the issue.

1

In my case debuggable true parameter was missing in app/build.gradle file. Adding it and rebuilding my app to device resolved the issue:

app/build.gradle:

android {
    buildTypes {
        debug {
            // Check if you have this parameter enabled.
            // Add if missing and rebuild your app to device. 
            debuggable true
        }
    }
}
Yamashiro Rion
  • 1,778
  • 1
  • 20
  • 31
0

I don't know what exactly works but I did two actions before be able to debug a gin my :app module.

  1. Removing .idea in my application.
  2. Opening another app project and running a debug session.

Not worked.

  1. restarting my compute
  2. restarting my phone
  3. disable and enable usb debuging
  4. try wifi debugging

Always got: Error running app Processes are not found. Aborting session.

Akhha8
  • 418
  • 3
  • 10
0

Android Studio - Go to file - Invalid Caches.. - Click on ‘Invalidate and Restart’

It works for me.

shraddha patel
  • 628
  • 4
  • 12