Java 亚行没有响应 - Android Studio
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/21246983/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
ADB Not Responding - Android Studio
提问by Rohodude
Don't mark this as a duplicate. Let me explain what's wrong and tell you what I've done. So here's my problem. When I open Android Studio, it gives me an error like so:
不要将此标记为重复。让我解释一下出了什么问题,并告诉你我做了什么。所以这是我的问题。当我打开 Android Studio 时,它给了我这样的错误:
So then I went to my windows firewall settings. Here is what I have:
然后我去了我的 Windows 防火墙设置。这是我所拥有的:
As you can see, Firewall is off. Then, I went to my antivirus security program and turned the settings off there:
如您所见,防火墙已关闭。然后,我转到我的防病毒安全程序并关闭那里的设置:
As you can see here too, I disabled Smart Firewall. Then, I opened Android Studio again. I got the same error here too.
正如您在此处也看到的,我禁用了智能防火墙。然后,我再次打开 Android Studio。我在这里也遇到了同样的错误。
I pressed the OK button and moved on. Then, Android Studio loaded up and everything. After that, ADB started loading. This is where the real error occurs.
我按下了确定按钮并继续前进。然后,Android Studio 加载完毕。之后,ADB 开始加载。这是真正的错误发生的地方。
I have also tried it with Eclipse, but it also says ADB not responding. For the past month or so, Android Studio has been working fine. I have never gotten these error or warning messages with Android Studio before, so this is rather new to me.
我也用 Eclipse 尝试过,但它也说 ADB 没有响应。在过去一个月左右的时间里,Android Studio 一直运行良好。我以前从未在 Android Studio 中收到过这些错误或警告消息,所以这对我来说是新的。
Here is what I have tried:
这是我尝试过的:
- In cmd,
adb kill-server
then I pressed the restart button on the ADB not responding message - Restarting computer
- Turning USB Debugging on and off on my Nexus 5
- 在 cmd 中,
adb kill-server
然后我按下了 ADB 上的重启按钮没有响应消息 - 重启电脑
- 在我的 Nexus 5 上打开和关闭 USB 调试
So, I really can't find a solution to this. Any help regarding this problem would be extremely appreciated.
所以,我真的找不到解决办法。任何有关此问题的帮助将不胜感激。
回答by Nick Cardoso
Sometimes it just gets into a mess. Close your ide then Go to processes and terminate all adb processes.
有时它只会陷入混乱。关闭您的 ide,然后转到进程并终止所有 adb 进程。
Then when you open up android studio it should kick off adb again fresh (or you could run something like 'adb devices' from command prompt before opening the ide if you're worried it gets in to a bad state while the ide is waiting for it to initialize)
然后,当您打开 android studio 时,它应该再次启动 adb(或者您可以在打开 ide 之前从命令提示符运行“adb devices”之类的东西,如果您担心在 ide 等待时它会进入错误状态它来初始化)
If none of that works you could also reboot your device. I've very rarely found it necessary, but it has helped me in the past
如果这些都不起作用,您也可以重新启动设备。我很少觉得有必要,但过去它对我有帮助
回答by TongLi
This happened to me as well. I solve it by terminating all process that is using port "5037" which is, by default, the port used by adb.
这也发生在我身上。我通过终止所有使用端口“5037”的进程来解决它,默认情况下,这是 adb 使用的端口。
回答by DiscoStu
I had the same error messages, but a different problem. Port 5037 was not in use, but still adb couldn't start.
我有相同的错误消息,但有不同的问题。端口 5037 未使用,但仍然无法启动 adb。
So after hours of trying I finally realized, that it was an installed VPN-client (Checkpoint Endpoint Security). Even though there was no connection (and I even killed the process) the connection didn't work. After uninstalling everything worked like a charm.
因此,经过数小时的尝试,我终于意识到这是一个已安装的 VPN 客户端(Checkpoint Endpoint Security)。即使没有连接(我什至终止了进程),连接也不起作用。卸载后一切都像魅力一样。
Maybe it helps someone who reads this question, because everywhere else you just read about the blocking port. And in addition, while the client was installed some other TCP-based Frameworks and even Windows-Remotedesktop stopped working too.
也许它对阅读此问题的人有所帮助,因为您在其他任何地方都只是阅读了有关阻塞端口的信息。此外,虽然客户端安装了一些其他基于 TCP 的框架,甚至 Windows-Remotedesktop 也停止工作。
回答by M.Hefny
Kill processes bas_deamon & bas_helper Then press restart for ADB and it will work.... this what I do in WIndows 7 when I face this issue.
杀死进程 bas_deamon 和 bas_helper 然后按 ADB 的重启键,它就会工作......这就是我在 WINdows 7 中遇到这个问题时所做的。
回答by Eric M. Smith
You may want to make sure your phone is unplugged. When it is plugged in, I have noticed this happening and the solution for me (which may be Mac specific) is to unplug my phone from the computer.
您可能需要确保您的手机已拔掉插头。当它插入时,我注意到这种情况发生,我的解决方案(可能是 Mac 特定的)是将我的手机从计算机上拔下。
回答by Vikas Rana
Sir, Actually Sometimes our parent control software interfere with it. but after turning off its real time protection , we got this error. so basically you need to check the whether we are using 32 bit Android Studio or 64 bit. just try to av same bit operating system as of Android Studio , u ll get this error removed after that. :)
先生,实际上有时我们的家长控制软件会干扰它。但是在关闭其实时保护后,我们得到了这个错误。所以基本上你需要检查我们使用的是 32 位 Android Studio 还是 64 位。只需尝试使用与 Android Studio 相同的操作系统,您就会在此之后删除此错误。:)
回答by Abdo
回答by Andrej1A
I had the same problem on Mac OS X. After some research I've found a bad entry in my /etc/hosts
file for my localhost (192.168.99.100 localhost
).
我在 Mac OS X 上遇到了同样的问题。经过一些研究,我在/etc/hosts
我的 localhost ( 192.168.99.100 localhost
)文件中发现了一个错误条目。
I removed the bad line and left the line 127.0.0.1 localhost
for ipv4 and some entries for ipv6 in.
我删除了坏行并留下了127.0.0.1 localhost
ipv4的行和 ipv6 的一些条目。
After a reboot the Android Studio was able to communicate with adb and found my connected Android device again.
重新启动后,Android Studio 能够与 adb 通信并再次找到我连接的 Android 设备。