模拟器频繁断开连接,Android Studio卡住了.如何解决? [英] Emulator disconnect frequently and Android Studio Stuck. How To fix it?

查看:738
本文介绍了模拟器频繁断开连接,Android Studio卡住了.如何解决?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个奇怪的问题,无法为它找到任何解决方法. 当我打开模拟器并且AVD正常运行时,一切都第一次正常.但是5-10分钟后,模拟器断开连接,失去了互联网连接,我无法连接到它,而且Android Studio完全卡住,什么也没发生! 我应该关闭模拟器,然后一切恢复正常.

I have a strange problem which cannot find any fix for it. Every thing is OK for the first time when i open emulator and AVD run normally. but after 5-10 minutes, the emulator disconnect,it lose it's internet connection and i cant connect to it,also the Android Studio completely stuck and nothing happen ! I should close the emulator and after that everything become normal again.

这些是我测试过的:

adb kill-server然后 adb start-server

我也尝试过再次连接和断开连接

I also tried connecting and disconnecting again

adb connect localhost:5554以及adb connect emualtor-5554,但仍然没有结果.

adb connect localhost:5554 and also adb connect emualtor-5554 but still no result.

更糟糕的是,我无法再使用Android Studio,即使单击代码行也不起作用!

The worse part is that I can't use Android Studio anymore, even clicking on lines of codes don't work!

每次我都应该关闭仿真器,然后再次打开它.

Every time I should close the emulator and open it again.

注意:我无法使用Genymotion,也不想使用我的设备进行调试!

NOTE : I can't use Genymotion, and I don't want to use my device for debugging!

任何机构都可以对此臭虫进行任何修复.这让我发疯了... 预先感谢

Can any body have any fix for this damn bug. it made me crazy ... thanks in advance

问题与模拟器无关.今天,我尝试使用WiFi连接进行调试.一切都很好,直到问题再次出现在我的真实设备上.在日志中说:

The problem is not something related to emulator. Today I try to debug with WiFi connection. Everything was good for a while till the problem happened again with my real device. In log it said :

deviceXXXXX已断开连接

deviceXXXXX disconnected

所以问题出在我的ADB连接上!

So the problem is with my ADB connection !

我测试的是将5555端口添加到防火墙,还添加了ADB以通过防火墙.但是问题仍然存在.

What I tested was adding port 5555 to firewall also added ADB to pass through firewall. But still the problem persists.

推荐答案

您的android studio版本,jdk版本,操作系统是什么?

What's your android studio version, jdk version, os?

您要定位的是什么API?

What api are you targeting?

Android Studio 2的新功能可能出现问题即时运行.

Can be a problem with new feature of android studio 2 instant run.

首先尝试将其关闭.

请注意,如果您要定位N开发者预览版,则必须才能使用Java 8 .

Be aware if you are targeting N Developer Preview is required to use Java 8.

更根本的方法是回滚到android studio 1.5并进行测试.

More radical way is to rollback to android studio 1.5 and test.

这篇关于模拟器频繁断开连接,Android Studio卡住了.如何解决?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆