使用物理设备调试 Android 应用程序失败
在几台设备上使用 Android studio 测试我的 Android 应用程序没有问题后,几天后我在控制台中收到以下日志:
14:48 无法打开与 ADB 服务器的连接:java.io.IOException: 在端口 5037 上找不到 adb 服务器,IPv4 尝试:连接被拒绝: 连接,IPv6 尝试:连接被拒绝:连接
14:48 启动监控19134523021744失败
14:49 * 守护进程未运行;现在从 tcp:5037 开始
14:49 * 守护进程成功启动
14:49 * 启动监控19134523021744失败
并继续像这样...启动守护线程,然后立即报告上述错误。在 Android Studio 的设备列表中,我的物理设备继续出现并从列表中消失。
看起来 ADB 正在间歇性地工作,我无法再进行调试。当我尝试启动应用程序时,无论我使用哪种物理设备,都会收到一条错误消息“设备已离线”。它仅适用于模拟器。我多次尝试重新启动电脑,检查设置,但无济于事。有什么提示吗?
After testing my Android app with Android studio on several devices with no problem, since a few days I get the following log in the console:
14:48 Unable to open connection to ADB server: java.io.IOException:
Can't find adb server on port 5037, IPv4 attempt: Connection refused:
connect, IPv6 attempt: Connection refused: connect14:48 Failed to start monitoring 19134523021744
14:49 * daemon not running; starting now at tcp:5037
14:49 * daemon started successfully
14:49 * Failed to start monitoring 19134523021744
and it continues like this... starting the deamon thread and immediately after that it reports the errors above. In ther device list of Android Studio my physical devices continue to appear and disappear from the list.
It looks like the ADB is working intermittently and I'm not able to debug anymore. When I try to launch the app I get an error saying that "the device is offline", no matter which physical device I use. It works only with the emulator. I tried to restart the PC several times, checked the settings, to no avail. Any hint ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论