简体   繁体   English

Android Studio 冻结在“正在初始化 ADB...”

[英]Android Studio freezes on "Initializing ADB..."

Android Studio can freeze at any moment. Android Studio 可以随时冻结。 And every time afer re-starting it again freezes on "Initializing ADB...".每次重新启动后,它都会冻结“正在初始化 ADB ...”。 Only re-starting of PC helps to solve the problem.只有重启电脑才能解决问题。 I have 8GB RAM.我有 8GB 内存。

I increased size of memory in 4 times in studio64.exe.vmoptions but it didn't help:我在 studio64.exe.vmoptions 中将内存大小增加了 4 倍,但没有帮助:

-Xms512m
-Xmx2560m
-XX:MaxPermSize=1400m
-XX:ReservedCodeCacheSize=900m
-XX:+UseConcMarkSweepGC
-XX:SoftRefLRUPolicyMSPerMB=50
-ea
-Djna.nosys=true
-Djna.boot.library.path=

-Djna.debug_load=true
-Djna.debug_load.jna=true
-Dsun.io.useCanonCaches=false
-Djava.net.preferIPv4Stack=true
-Didea.paths.selector=AndroidStudio1.3
-Didea.platform.prefix=AndroidStudio

在此处输入图片说明

Thank you very much!非常感谢!

Disconnect the device that is connect.断开连接的设备。 And then the Initializing would stop.然后初始化将停止。 And then you can reconnect the device.然后您可以重新连接设备。 Works for me every single time每次都对我有用

Reconnect and restart adb-server does not help.重新连接并重新启动 adb-server 没有帮助。

My fault is deleted the localhost config in /etc/hosts.我的错是删除了 /etc/hosts 中的 localhost 配置。

127.0.0.1 localhost

after adding this line to /etc/hosts, everything works fine.将此行添加到 /etc/hosts 后,一切正常。

Note that maybe you have installed some hosts auto config software.请注意,您可能已经安装了一些主机自动配置软件。 Just make sure ping localhost in the terminal and see 127.0.0.1 on screen.只需确保在终端中 ping localhost 并在屏幕上看到 127.0.0.1。

I was also facing this issue.我也面临这个问题。

I just resolve this issue by restarting Android Studio.我只是通过重新启动 Android Studio 来解决这个问题。

I have been facing it.我一直在面对它。 Sometimes the IDE fails to access the folder ADB is contained in. Try running the application as an administrator.有时 IDE 无法访问 ADB 所在的文件夹。尝试以管理员身份运行该应用程序。

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

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