Google's Android Studio Simplifies Mobile App Development

 
 
By Jeff Cogswell  |  Posted 2013-07-23
 
 
 

Google's Android Studio Simplifies Mobile App Development


Google's Android Studio is a free IDE for developing Android applications using the Java programming language. Although new, the product is actually based on the popular IntelliJ IDEA Community Edition and was indeed a collaboration between JetBrains (the developer of IntelliJ IDEA) and Google.

As such, users of the IntelliJ IDEA will discover the product actually isn't all that new, but has a few new features. eWEEK Labs looked at Android Studio, and for this review, I'm taking the approach of a new user who has never used IntelliJ IDEA before.

Installing the open-source Android Studio is easy; you simply download the installer and run it. Because it's Java-based, you have to make sure you have a recent Java JDK available. And because you're going to use it to develop Java applications for Android, you need the full Java JDK, not just the Java JRE (that is, the development kit, not just the runtime edition).

When you start up Android Studio, a dialog box opens, letting you open an existing project or create a new one. When you create a new project, Android Studio launches a wizard that guides you through creating and configuring a project. The first screen asks for the name of the application, a module name, a package name, a project location and information about the target Android version.

For the version, you specify both the target as well as the earliest Android version your mobile application will support. This is important so that the application can notify users if their version of Android is too old. You can also specify a theme for the application; the options are None, Holo Dark, Holo Light, Holo Light with Dark Action Bar. These are the standard Android themes; the Holo Dark is the dark screen with light letters typically seen on an Android screen. The Holo Light is a newer theme with a gray background and dark letters.

The next page in the wizard lets you choose an icon for your application. If you don't choose one, the default is the familiar green Android robot character. Or you can choose from one of many built-in icons, although they're all very plain-looking, monochrome images.

Or, for the graphically challenged such as myself, you can even choose some text for the icon by typing a word and selecting any font installed on your system. Android Studio will then create an icon from that text and font. You'll want to limit your text to just a word or so, because it will get scaled down for the smallest icons, which can result in unreadably small text.

Next is an important screen for the activity settings. You can choose blank activity, full screen activity, login activity, master/detail flow and settings activity. The login one lets users enter an email address and password before starting up your application. For my tests I used the master/detail flow, which requires a minimum of Android 3.0 (Honeycomb), as this layout wasn't available in earlier versions of Android. The master/detail flow lets your users browse through a collection objects, and view details on each one.

Google's Android Studio Simplifies Mobile App Development


After you choose master/detail flow, the wizard then asks for the type name of the object to be used in the application, both as a singular noun and as a plural noun. For this project I used the names Expense and Expenses. Or, if you choose any of the other activity types, the next page of the wizard asks you for the Activity Name and the Layout Name as well as Navigation Type. For Navigation Type, you can choose Fixed Tab + Swipe, Scrollable Tabs + Swipe or Dropdown.

After these steps, a new project is created. The project is a complete starting point for your own application. Included in the project is a set of build files that use the Gradle build system; if Gradle isn't already installed, Android Studio will install it during the creation of the first project.

The initial source code contains the skeleton code as you configured it during the wizard, with the directory structure matching the package names as is standard for Java development. There's also an XML file describing the layout. When you open this layout, you can get to the WYSIWYG designer.

At first glance, this designer is a bit intimidating. There's a boatload of stuff on the screen. But looking at it closely, the left pane is actually a wide pane showing all the widgets and controls available. In the middle is the actual designer that displays the screen just as it will look when running on the Android device. You can click on the components in the designer and then, over in the Properties pane, set the different properties for the selected component—just like a typical IDE designer.

Besides the designer, there is, of course, a code editor. As with any good modern code editor, this editor includes full syntax highlighting based on the language as specified in the filename extension, as well as a popup autocomplete showing object members.

Android Studio is the IDE for building your application. In order to run and test your application, you use any number of tools such as the Android emulator that is included with the Android SDK. This emulator tends to be extremely slow and resource-hungry. With this in mind, I tested my apps in Android running inside VMware Player. This worked great. I simply had to start the adb Android debugger manually at the command prompt; Android Studio then detected adb was running, allowing me to debug my application. It worked perfectly; I had no gripes or problems.

Although not a completely new product, Android Studio is just what you would expect from a modern, powerful IDE. It's every bit as good as other IDEs such as Eclipse. And the Android-specific features make it easy to use. And the amazing part? This is only an early access preview, yet it's in fine shape already. It looks like I've found my new Android development tool.

 

Rocket Fuel