Last month at Google I/O, the Android community announced the release of their new integrated development environment: Android Studio. Android’s new IDE is based on the popular Java-oriented IDE, IntelliJ IDEA Community Edition (also free!).
Because CURTIS Digital uses IntelliJ IDEA in its arsenal of Android development tools, we’re especially ready to begin tinkering with this new offering. To help get everyone else excited about this early access preview of Android Studio, we’ve outlined some of our favorite features so far.
Code Editor Tricks
One of the more understated features of Android Studio is the ability for inline resource lookup. This means variables display real derived values based on code when browsing your source. Instead of having to trace a variable’s data to see what data should appear, the editor shows it to you.
Photo from: Android Developers Blog
This can be especially useful in applications that are text-intensive. Debugging content-related issues can be done in the editor now, instead of requiring a release to an actual device… or worse: having to hand-trace variables back to the data they use. Don’t worry, though. This feature doesn’t lock you into a “real data” dummy mode. When you select the text string, the editor automatically reverts back to the variable name for all your standard development needs.
In keeping with this real-time display of development resources, Android Studio also populates the editor’s gutter with icons, colors, and other UI elements in-context with the code. This can be useful in verifying that you’re using the correct elements in a given section of your application. Nothing worse than having an “Outbox” icon where the “Inbox” should live.
Code Analysis Tools
Static Code Analysis
Using built-in annotations specific to Android development, Android Studio implements Lint-based code analysis that will help you find breakpoints in your application. By default, the editor knows expected returns for many methods, knows what constants are allowed in Android API’s, etc. This boils down to developers finding bugs early/often during the development process, which leads to increased time savings during projects with tight deadlines.
Advanced code refactoring
For making your code more maintainable and extensible, Android Studio also offers advanced code refactoring tools. For example, the editor will replace repeated code blocks with calls to a specific method. Making your code more modular helps with extensibility AND it makes your code as lean as possible.
Layout Tools
UI Layout Editor
Android Studio also offers a nice graphical editor for creating and updating layouts. While some developers may want to stick with the “old school” approach of creating layouts strictly with XML, Studio’s layout editor offers a handy graphical interface.
Layout Preview
The layout preview shows the developer what their code will look like on an actual mobile device. The coolest part is that the layout will update in real-time with code updates, so your preview is always in sync with any edits made. Gone are the days of having to deploy before you can test miniscule changes in your layout design!
You can expand the Layout Preview feature to display localized content. For example, many applications offer multiple languages which usually come with their own specific character sets. With the “localized content” portion of the Layout Preview, a developer can see what the app will look like in all supported languages… simultaneously! Now you can see bugs caused by localized content at the development stage instead of waiting for testers to discover the same bugs after deployment. As they say, time is money… and this feature saves both!
Photo from: Android Developers Blog
Price
Our favorite thing about this tool, especially considering the great quality, is the price tag. Like IntelliJ community edition, Android Studio is released under the Apache 2.0 license. This provides a very economical way for anyone who’s interested in developing on Android to get started right away. And considering that Android is an open-source operating system, it only makes sense that the tools used to develop around it are freely available to the public.
CURTIS Digital’s Android team runs lean and mean, so it’s no wonder that they take advantage of low-cost tools when they meet our high development standards. In fact, before the announcement of Android Studio, they liked to use Eclipse because of the plugin library Google provides.
Conclusion
With open-source projects, community involvement is necessary to make the product useful and stable. As such the Android Development community needs help in testing out their new Android Studio offering. If this sounds like the tool for you, download a copy of the preview from the Android Developer site. Once you’ve had some time to use the product, be sure to also report bugs to Android Studio issue tracker