Monday, November 10, 2014

Setting up Android development environment with DevAssistant

If you have ever tried to set up your Eclipse IDE for Android development, you will probably agree with me that it is a tedious job. You need to:
  • install ADT plugin, but first you need to tell Eclipse about the 3rd party repository from where to install it
  • restart Eclipse
  • download SDK Tools and tell Eclipse where to find it
  • select additional Android SDK packages to install in SDK Manager
The process doesn't sound like a lot of fun, if you ask me. Of course there are other options. For example Google is working on IntelliJ IDEA based IDE called Android Studio, a dedicated IDE for Android development. It definitely sounds like an interesting project and I recommend to check it out. But on the other hand, I wonder how many developers used to Eclipse will eventually switch to this new IDE? You know, a habit is a shirt made of iron.
Nevertheless, back to what I originally wanted to share with you. You've probably heard of DevAssistant by now. In short, it's a tool which aims to help developers with setting up their development environment. And, as you've probably guessed, we can use this tool to automate the tedious process described above. So let's try it out.

First you need to enable additional Copr repository and install an RPM with Android assistant. You will also need to have package dnf-plugins-core installed in order to effectively work with Copr repositories.

# dnf install dnf-plugins-core
# dnf copr enable msrb/devassistant-android-eclipse
# dnf install devassistant-android-eclipse-assistant

Note the steps above will not be needed in a future, because DevAssistant will have its own repository for assistants (DAPI = DevAssistant Package Index).

Now we are ready to run DevAssistant itself:

$ da task android-eclipse --accept-sdk-license

Of course you can do this from GUI as well (just run "da-gui"), but I think that copy-pasting this one line is simpler and faster. DevAssistant will download and set everything up for you. This may take awhile, so it is an ideal coffee time.

When DevAssistant is done, you can open your Eclipse and start developing Android applications.