A year has passed since Google introduced Android Studio IDE at the Google I/0 2013 Conference. A month later, we wrote an article on how Eclipse would slowly, but ultimately lose its position and recommended switching to Android Studio. Over 25,000 people read this article. Were we right?
Today, in 2014, over 75% of the world’s smartphones use Android as their operating system. Soon, Android will evolve beyond mobile phones – it will be in smart watches, cars, kitchen devices, laptops. And thanks to the mercy of the heavenly Gods of Java, we finally have a state-of-the-art IDE for Android.
I’ve never been an Eclipse fan. I never liked it in the first place, but after years of use, I’ve grown to hate it to the point that I’d rather eat rusty nails than use Eclipse again.
I always thought of Eclipse as a ”student-project IDE”; I learned about it during my college years, did my lab work in it and used it to introduce myself to the world of Android development. But when things started to get more complicated – that’s when Eclipse started to frustrate me more and more.
You want to develop an application and use more than 3 projects in your workspace? OK, but you’ll have to clean your project and restart Eclipse every couple of minutes. You want to upgrade Ant? OK, but you’ll have to spend a few more hours to get your project back to life. You want to release your application? OK, but close all other active applications because Eclipse will crash every few seconds.
Android developers were desperate for a more stable IDE and were quite optimistic when Google announced Android Studio. Eclipse slowly started to lose its market share and in less than one year it became obsolete, a relic of some older, “darker” times.
It couldn’t rival Android Studio because it was designed differently, in different times. You can use Eclipse for a bunch of different programming languages and for a bunch of different platforms, but it couldn’t adapt completely to the world of Android development. On the other hand, Android Studio is designed specifically for Android development and its main goal is to speed up the Android development process and make it easier and simpler.
Hail to the king!
I’ve been using Android Studio for a few months now and have made a list of reasons why it’s, in my opinion, superior to Eclipse:
1. Gradle project structure
Android Studio introduced a new project automation tool – Gradle, which replaced Apache Ant. Have you ever tried to upgrade your Ant version while developing an Android application and cried in agony when your project exploded into millions of pieces? Upgrades are always frustrating and in 9/10 cases you have to modify Ant scripts or your project to bring it back to life.
Gradle also allows you to use different flavors of an application – you can define separately the development and production version. You don’t want to use Proguard and have different app icons in the dev and prod version? Just modify your build.gradle file.
2. Smart shortcuts
Android Studio replaces references to resource files with their real values, so you can find out which color you are using or what is the height of the layout directly from the code editor.
3. Improved graphical preview
I’ve always experienced a lot of problems while using graphical preview in Eclipse. In Android Studio you can build layouts and observe changes in real time. Heck, you can even track these changes on different screens!
Android Studio uses Lint by default, and you can modify your Gradle files to include Lint when releasing your APKs – if Lint finds some warnings, it will automatically abort your release process.
Why is this good? It forces you to use good Android development practices (like defining all of your dimensions in separate XML files, or avoiding hardcoded strings), it can point to unused resource files (which results in a smaller APK file in the end), mistakes or unused permissions in the manifest file etc. We want to speed up our development process, but we also want to produce quality code.
5. Unit tests
One of the most important steps in software development is testing – you want to avoid bugs and errors. In Android Studio you can define your unit tests in separate classes and launch them while building your applications. In case of an error, you know where your bugs are even before they happen in production.
Android Studio is fast – and by fast I mean really fast. Just for comparison – in Eclipse you need at least one or two minutes for building release versions of more complicated projects. In AS you can build the same project in less than 30 seconds.
Dawn of a new era
In conclusion, in less than a year, Eclipse lost its position as the primary IDE for Android development and became extinct. By the mercy of the heavenly Gods of Java, we have also fought in this war, alongside other developers.
Now we are quite optimistic about how Android will evolve with AS in future years because Android development is once again fun and simple. Android Studio is the new king and we wish him a long and happy reign…