2016/12/06

Running the Android Studio emulator

Ha! I'm beginning to grok this thing (a Robert Heinlein would have said).

When you click on the green run button in Android Studio...




...you need to have run the emulator at least once in that session to get it to appear in the list of available devices. Otherwise you just get a blank list. So if you intend to run your program in the emulator click on AVD manager:



On my machine the Tools menu is only built up over the first minute that Studio is run. So initially it only contains Tasks & Contexts and Save File as Template, which is disconcerting. You just have to be patient till al the menu items are loaded.


Then hopefully you'll see a list of virtual devices which you have previously set up. Once the emulator is running you can get your app running by pushing the main green button in Android Studio...



It did run but I got a scary message that I was trying to use 1500MB in a 512MB emulation.
Ah. What now? Mr google and stackoverflow came to the rescue by telling me to edit the virtual device, reducing the ram setting. 

If you are used to Windows changing the properties of something is often done with a right click and selection of properties. So I tried that. There was a menu, but no properties entry. Hmm. I put all three of my neurons to work and saw the pencil icon...





Clicking on the pencil gave me the dialog to change the ram size of the emulated device, once I'd click on "advanced". I found the edit box to change and clicked on Finish...







...But again Android Studio seemed to hang. It hadn't, but there was no indication (with a hourglass cursor or something) that it was working away properly. It was disconcerting.

In the end though changing the ram down to 512MB got rid of the warning.

I'm still not sure about Android Studio, it seems clunky and slow, but maybe Xamarin is worse! Which is the reason for these blog posts, I want to be able to compare the two...

Here's how I got on with Xamarin...

No comments:

Post a Comment