简体   繁体   English

亚行没有回应 - Android Studio

[英]ADB Not Responding - Android Studio

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时,它会给我一个错误:

TCP / IP

So then I went to my windows firewall settings. 那么我去了我的Windows防火墙设置。 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. 然后,我再次打开Android Studio。 I got the same error here too. 我也遇到了同样的错误。

TCP / IP

I pressed the OK button and moved on. 我按下OK按钮继续前进。 Then, Android Studio loaded up and everything. 然后,Android Studio加载了一切。 After that, ADB started loading. 之后,亚行开始加载。 This is where the real error occurs. 这是真正的错误发生的地方。

亚行错误

I have also tried it with Eclipse, but it also says ADB not responding. 我也尝试过Eclipse,但它也说ADB没有回应。 For the past month or so, Android Studio has been working fine. 在过去一个月左右的时间里,Android Studio一直运行良好。 I have never gotten these error or warning messages with Android Studio before, so this is rather new to me. 我以前从未在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 在cmd, adb kill-server我按下了ADB未响应消息上的重启按钮
  • Restarting computer 重启电脑
  • Turning USB Debugging on and off on my Nexus 5 在我的Nexus 5上打开和关闭USB调试

So, I really can't find a solution to this. 所以,我真的找不到解决方案。 Any help regarding this problem would be extremely appreciated. 关于这个问题的任何帮助将非常感激。

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 我很少发现它是必要的,但它在过去帮助了我

杀死进程bas_deamon和bas_helper

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中所做的事情。

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特定的)是从计算机上拔下我的手机。

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). 因此,经过几个小时的尝试,我终于意识到,它是一个已安装的VPN客户端(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. 卸载后的一切都像魅力一样。

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也停止了工作。

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”的所有进程来解决它,默认情况下,端口“5037”是adb使用的端口。

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. 所以基本上你需要检查我们是否使用32位Android Studio或64位。 just try to av same bit operating system as of Android Studio , u ll get this error removed after that. 尝试使用与Android Studio相同的操作系统,之后将删除此错误。 :) :)

For Windows: add a system variable as following and then restart your Computer then try again - it will be OK 对于Windows:添加如下系统变量,然后重新启动计算机,然后再试一次 - 这样就可以了

ANDROID_ADB_SERVER_PORT
10501

添加系统变量

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 for ipv4和ipv6 in的一些条目。

After a reboot the Android Studio was able to communicate with adb and found my connected Android device again. 重启后,Android Studio能够与adb进行通信,并再次找到我连接的Android设备。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM