Android Studio 2.1.1:“未检测到 USB 设备或正在运行的模拟器"
突然我的 Android Studio 停止检测我的所有设备,它们都没有工作.它从一个执行到另一个执行.我更改了几行代码(可能 1 分钟?),点击运行(即时运行),然后我错过了所有设备.
Suddenly my Android Studio stopped detecting all my devices, none of them is working. It happen from one execution to another. I've changed a few lines of code (1 min maybe?), hit run (instant run) and then I missed all my devices.
我使用的是 Mac 和设备:Nexus 5x、Galaxy s6 和 Oneplus One.会发生什么?我在这里检查了以前的问题并尝试了所有这些:
I'm using a Mac and as devices: Nexus 5x, Galaxy s6 and Oneplus One. What can be happening? I've checked previous questions here and tried all this:
- 运行配置:无论我选择USB设备还是显示窗口,它都不起作用.
-
工具>安卓>启用 ADB 集成
:没有帮助 - 命令行
adb devices
也未检测到任何. - 我已撤销并再次授予 USB 授权.仍然无法正常工作.
- 我尝试过我拥有的其他应用,但都不起作用.
- 重启手机
- 重启安卓工作室
- 重新启动计算机
- Run configurations: no matter if I chose usb device or show the window, it does not work.
-
Tools > Android > Enable ADB integration
: didn't help - Command line
adb devices
does not detect any either. - I've revoked and granted again USB authorizations. Still not working.
- I've tried other apps I have, none work.
- Restarted phones
- Restarted android studio
- Restarted computer
(注意:如果我启动一个模拟器它可以工作,但我更喜欢使用物理设备,因为我必须扫描真实的条形码)
非常感谢.
好吧,我已经解决了.万一任何人面临相同的问题是 Stetho (http://facebook.github.io/stetho/) 选项卡,您通过键入以下内容打开的选项卡:chrome://inspect/#devices 不确定原因,因为它现在已经打开 2 天了,但这就是原因,一旦我关闭它,它就起作用了.
Well, I've fixed. The problem in case any faces the same was a Stetho (http://facebook.github.io/stetho/) tab in chrome, the one you open by typing: chrome://inspect/#devices not sure about the reason because it's been open for 2 days now, but it was the cause, once I closed it, it worked.
在这里找到这个不被接受的答案:macbook adb 无法打开界面 那肯定应该被接受.
Found this unaccepted answer here: macbook adb cannot open interface That for sure should be accepted.
我已经能够复制这个问题.当您打开设备选项卡并尝试运行已配置听诊器的第二个应用程序时,就会发生这种情况.
I've been able to replicate the problem. It happens when you have the devices tab open and try to run a second app that has stetho configured.