Saturday, December 13, 2014

The new Android Studio and intel HAXM

Hola! It's been a long time since I have blogged anything. Well, let's not make any promises, I actually just wanted to document some stuff I was doing, so might as well do it here and try to stop being a lazy ass.

The new Android Studio is really cool, and I decided to try it out since I have not touched ADT eclipse for a long time anyways. But right now, http://developer.android.com/ looks like this: 



That is so not cool Google. It's bad!! So that's why I am here actually, wasting time, waiting for the page to come back alive so I can continue with their tutorials. Trying to learn something shouldn't be this hard! Trying to get in on the #HourOfCode and sh*t. heh heh.


So I had previously used the old Android Studio, and it kept saying it couldn't find the SDK, so I was pretty miffed and left it for a while. Then I tried redownloading the Android Studio again, and pow wow, there was a new snazzy Android Studio. 


I like it, I do, but the emulator was super duper slow.. :( So after some googling, found out about the Intel HAXM thingy to help make it faster. 


Or you could use the SDK Manager to install it, but apparently it LIES! It will say that it is apparently installed:

But it really isn't, it's just downloaded, so you would have to search high and low for it. So don't bother, just download from the link above. Once you have downloaded it, double-click to install and if you hit a popup that says something about virtualization, then you would have to enable it in your BIOS.

So restart your computer(annoying - I know.) and get into the BIOS and look for "Virtualization Technology", and enable it. Then once you are back in Windows, then try installing the HAXM again. 

After installing that, I found I had to restart Android studio as well, and even then, it was a bit better, but still had issues. I restarted the virtual device several times, but it seemed to be getting worse. 

I found that apparently my device did not stop properly, and so I had to clear the locks on it. To do that, I removed all .lock files:



Another thing that helped, was to wipe the user data before I ran the virtual device:


As you can see, it says that the size on disk is 1 gigantous GB! When I started, it was only about 700 MB. So clean your disks people, it helps. After that, it was much smoother. Of course I haven't tested enough, but hopefully it stays this way. Subsequent deployment of apps was pretty fast.

Ahh, the page is back alive!