How do I fix "Could not connect to remote process" while trying to debug the application?
Solution 1
You need to restart the ADB.
kill adb.exe process.
how to restart ADB manually from Android Studio
Solution 2
Sometimes this happens when two Android-capable IDEs are opened, e.g. Android Studio and IDEA. Shutdown one of the two (or disable Android plugin in IDEA) helps.
Solution 3
In My case, For some reason I disabled Instant run and it has changed the Launch value from "Default Activity" to "Nothing" in "Run/Debug configurations". So always it says "Could not connect to remote process. Aborting debug session" and I was not able to debug. I enabled Instant and changed the Launch value from "Nothing" to "Default Activity" in "Run/Debug configurations" and it worked. Hope this will help some one.
(to get Run/Debug configurations, click "app" drop down and click Edit Configurations)
Solution 4
Check if you have selected the right Build Variant, usually "release" comes with debuggable false
Example:
buildTypes {
release {
debuggable false
....
}
}
is not recommendable change release to debuggable true
, just change the right variant
debug {
debuggable true
....
}
Solution 5
I try invalidate cache / restart and it's work
SAPHI
Updated on November 26, 2021Comments
-
SAPHI over 2 years
I am making a android studio project and I try to debug my application.
Running the application works fine, but when I try to debug it I get this error:
Could not connect to remote process. Aborting debug session.
What can I do to fix the issue?