“允许USB调试吗?”不断出现
当使用 Android Studio 与通过 USB 连接的 Samsung Galaxy Tab S5e 调试我的应用程序时,会出现这个愚蠢的“允许 USB 调试?”窗口不断弹出。我点击“始终允许来自这台计算机”的复选框,然后点击“允许”按钮,它立即再次询问我。然后在我的调试会话期间,它会再次随机弹出并中断连接。它开始使调试几乎不可能。我尝试进入设备设置/开发者选项并撤销 USB 调试授权,关闭并再次打开 USB 调试,拔下 USB 电缆,重新启动我的设备,关闭 Android Studio,删除计算机中的 adbkey 和 adbkey.pub 文件/Users/xxxx/.android 文件夹以及这些文件夹的每个组合都没有成功。我过去一直运行得很好,但最近它开始无情地弹出这个窗口。有谁知道这里发生了什么以及如何解决这个混乱?
When debugging my app using Android Studio with a Samsung Galaxy Tab S5e connected via USB, this stupid "Allow USB debugging?" window keeps popping up. I tap in the checkbox that says "Always allow from this computer" and then tap the "Allow" button and it immediately asks me again. Then during my debug session, it will pop up again randomly and break the connection. It's starting to make debugging almost impossible. I've tried going to the device Settings/Developer Options and Revoke USB debugging authorizations, turned USB debugging off and on again, unplugged the USB cable, rebooted my device, closed Android Studio, deleted the adbkey and adbkey.pub files in my computer's /Users/xxxx/.android folder and every combination of those without any success. I've had it working okay in the past but recently it's started popping up this window relentlessly. Does anyone know what's going on here and how to fix this mess ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
可能是 USB 电缆有故障。换一个试试?或者尝试 PC 上的不同 USB 端口。
另外,您是否尝试过重新启动 adb 守护进程?
Might be a faulty USB cable. Try with a different one? Or perhaps try different USB ports on your PC.
Also, have you tried restarting the adb daemon?
在我的一台测试设备上,有时会发生这种情况。一种有时有效的解决方案(到目前为止 2 次中有 2 次)是重新启动手机,然后不需要进行其他更改(相同的 Mac、相同的 USB C 电缆、相同的 android studio 等),这一次它会记住我的之前的授权。
On one of my test devices, this sometimes happens. One solution that sometimes works (2 times out of 2 so far) is to reboot the phone, and then no other change is needed (same Mac, same USB C cable, same android studio, etc.), and this time it remembers my previous authorizations.