Converting to Android Studio

You are here

I've flirted a few times with Android Studio, but never made it to a complete project. My last flirtation was a Vuforia Application and, at the time, Vuforia required NDK capability which was not yet in Android Studio. So I stuck with Eclipse.

But that very same project forced me off the now defunct ADT version of Eclipse and back on to mainstream Eclipse, albeit a newer flavor. This switch to a newer Eclipse ultimately forced my conversion to Android Studio by breaking an older ADT project beyond all repair. It was self-inflicted, to be sure. I was warned as I opened the older ADT project that it would make it incompatible with ADT (yada yada), but I did it anyway. I figured, how badly could it break?

Plenty bad, is the answer. So bad, I had two options: 1) create a new Eclipse project in Luna and move the code over or, 2) start from scratch in Android Studio. Since Eclipse is no longer really supported by Google, off to Android Studio I went. I figured, how different can it be? After all, I use IntelliJ tools for Javascript and PHP and like those tools just fine (mostly).

How different? Plenty different! It's actually pretty jarring going from Android Eclipse to Android Studio. Here were the big adjustments:

  • Project structure is completely different both in terms of file structure, and how it is presented in the project panel. I had gotten very comfortable with how Eclipse did it, in fact, I just assumed that was the "Android Way". Nope.
  • It's not real obvious how to have multiple projects open in the same workspace. I did this all the time in Eclipse where I had source libraries side by side with project code. In Android Studio, you use the Gradle build system to include sources you need for a project directly from GitHub, MavenCentral, etc. A lot like Cocoapods for iOS, or Bower for Javascript. This works great for open source libraries, but I have not tried it yet for my own.
  • Getting code completion and auto-imports, etc. set up was a bit of chore, but once done, it works as good, or better than Eclipse.

After about 2 weeks of migrating over the ADT project, I have to say I like Android Studio better than Eclipse. The UI is cleaner, the Gradle build system, while a little hard to understand, is more powerful. The application is a bit unstable on my 2014 Macbook Pro, especially when editing complex layouts, but probably no worse than Eclipse was.

So if you've been waiting to make the switch, dive in, the water's fairly warm.