Reputation: 1630
I am stuck in a problem here.
I cannot attach debug using Android Studio 3.5.1.
Its keeping showing me the message "Error running 'Android Debugger (8600)': Unable to open debugger port (localhost:8600): java.io.IOException"
I tried a lot of things like:
adb reset
invalidate
restart windows
reinstall android studio
and none of them works.
And I cannot find Enable ADB Integration on this version.
Anyone knows how to fix it?
EDIT
Debugging with emulator is working with all versions.
Debugging with devices is working only with devices with Android 9.0+
Kill and start adb didn't work. I dont think its a local problem because its happen with a lot of people here. Its seems to be a project problem
Upvotes: 3
Views: 5440
Reputation: 628
.First you need to check your build.gradle(app) file , and ensure that your build is debuggable.
.If debuggable then you need to check adb is working or not in your system, you can check by just press 'adb' .
Upvotes: 0
Reputation: 913
Try this:
adb kill-server
adb start-server
adb usb
For linux
, e.g., ubuntu
: start all commands with sudo
like this:
sudo adb kill-server
.
Upvotes: 2
Reputation: 302
You might check this 3 things:
1.
Youre not running a not debuggable version.
android:debuggable="false" in Android Manifest
2.
In Android studio you re not building a release version
Check in Build variants in bottom left corner.
3.
If nothing works use Troubleshoot device connections
Tools -> Connection Assistant
or older version
Tools -> Troubleshoot device connections
And try out the helper page from google (seems for older versions)
https://developer.android.com/studio/run/device#assistant
Upvotes: 5
Reputation: 835
its your connection issue, cant find your device DNS.
what is your OS ?
In windows:
you must go to network and find duplicate dns and clear it (Search for it)
In mac:
you must kill adb or delete that and run a new version
last hit is Update emulator in sdk
Upvotes: 0
Reputation: 998
Try this. I have had luck with this approach when I run into problems with adb.
You can check if the device is recognised or not using
adb devices
If it is indeed recognised you may try to kill adb and start it again
add kill-server
adb start-server
Upvotes: -1