Android Studio (Beta 0.8.9): Teething problems with Preview and AVD Emulators


Android Studio is better than Eclipse (ADT) for code prompts and reminding you to update the IDE, but there are some things you still need to do once you've downloaded and installed it in your Applications folder (OS X). The first two of which are essential if you're going to use the Android emulator:

(1) install and update the SDK files using Android SDK manager
(2) create new emulator devices using AVD manager (Android Virtual Device Manager)

Otherwise you'll get a kernel error and you won't be able to run any virtual Android devices.

The third problem I encountered was that in the design preview of the layout file the only option available to me was API 20:4.4W even though I'd set Ice Cream Sandwich as my lowest deployment target. Unfortunately, this is the Android Wear API and doesn't support editable text in a text view, and so was throwing an error about rendering the preview when I tried to add an editable text field.

There was a peculiar solution to this: I went to the app->source->build.gradle file and changed a few of the version numbers, synced and then changed them back again and synced again. After this the drop down list to the top right of the preview was complete.

Maybe a reboot would've done the same thing but I'm recording here in case anyone is stuck with the same problem.

Endorse on Coderwall

Comments