Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Studio freezes on "Initializing ADB..."

Android Studio can freeze at any moment. And every time afer re-starting it again freezes on "Initializing ADB...". Only re-starting of PC helps to solve the problem. I have 8GB RAM.

I increased size of memory in 4 times in studio64.exe.vmoptions but it didn't help:

-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

enter image description here

Thank you very much!

like image 258
Kiryl Ivanou Avatar asked Aug 03 '15 11:08

Kiryl Ivanou


People also ask

How do I know if ADB is installed Android studio?

Firstly check if the adb is present in the SDK folder. For this, open C:\Users\Username\AppData\Local\Android\Sdk\platform-tools and check if adb.exe is present.


2 Answers

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

like image 114
Arun Shankar Avatar answered Sep 18 '22 20:09

Arun Shankar


Reconnect and restart adb-server does not help.

My fault is deleted the localhost config in /etc/hosts.

127.0.0.1 localhost

after adding this line to /etc/hosts, everything works fine.

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.

like image 24
xingjiu Avatar answered Sep 18 '22 20:09

xingjiu