Android Studio - 无法打开调试器端口:java.io.IOException [英] Android Studio - Unable to open debugger port: java.io.IOException

查看:157
本文介绍了Android Studio - 无法打开调试器端口:java.io.IOException的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在这里遇到了一个问题.

I am stuck in a problem here.

我无法使用 Android Studio 3.5.1 附加调试.

I cannot attach debug using Android Studio 3.5.1.

它一直向我显示消息运行'Android调试器(8600)'时出错:无法打开调试器端口(本地主机:8600):java.io.IOException"

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

它们都不起作用.

我在这个版本上找不到启用 ADB 集成.

And I cannot find Enable ADB Integration on this version.

有人知道怎么解决吗?

编辑

使用模拟器调试适用于所有版本.

Debugging with emulator is working with all versions.

使用设备进行调试仅适用于搭载 Android 9.0+ 的设备

Debugging with devices is working only with devices with Android 9.0+

杀死并启动 adb 不起作用.我不认为这是一个本地问题,因为它发生在这里的很多人身上.好像是项目问题

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

推荐答案

您可能会检查这 3 件事:
1.您没有运行不可调试的版本.
Android 清单中的 android:debuggable="false"

You might check this 3 things:
1. Youre not running a not debuggable version.
android:debuggable="false" in Android Manifest

2.在 Android Studio 中,您不会构建发布版本
在左下角签入构建变体.

2. In Android studio you re not building a release version
Check in Build variants in bottom left corner.

3.如果没有任何效果,请使用设备连接疑难解答
工具 -> 连接助手
或旧版本
工具 -> 设备连接疑难解答

3. If nothing works use Troubleshoot device connections
Tools -> Connection Assistant
or older version
Tools -> Troubleshoot device connections

并尝试谷歌的帮助页面(似乎适用于旧版本)
https://developer.android.com/studio/run/device#assistant

And try out the helper page from google (seems for older versions)
https://developer.android.com/studio/run/device#assistant

这篇关于Android Studio - 无法打开调试器端口:java.io.IOException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆