Ant vs. Eclipse builds for Android: everyone's strengths?

I used Eclipse and vim differently as a development environment for Android applications and found that the Eclipse plugin and the command line SDK tools have the same functionality.

Since I have not investigated any of them, I would like to ask:

What are the benefits of using Eclipse over command line tools and vice versa?

I could see:

  • (Eclipse) nice GUI for debugging
  • (ant / adb / android) is more suitable for automation
  • (hybrid) you can have it all, right?

I am particularly interested in specific functions, which can be a deal break for one and move the developer in the direction of the other.

+6
android eclipse ant adb
source share
6 answers

In my personal projects and several professional examples of creating Android applications, I always used both types of builds. You will want to use Ant (or Maven if you want) to configure continuous integration and automatic testing. Trying to get Eclipse working (which I did a long time ago when the Android SDK first came out) is a nightmare, and Ant / Maven is easy to use from any of your favorite CI tools (I used to use Hudson for this). If your project is not unusual, this will be an easy way to combine continuous integration and exit.

Meanwhile, for day-to-day development work, using Eclipse to build your application works fine on the spot. But this can easily be left as a separate developer. I would make a build in which your CI system runs a canonical build, but I use Eclipse for normal development.

+2
source share

Using Eclipse as your development environment for Android does not exclude that you also create Ant to connect to nightly builds or CI tools. You can even configure Eclipse to build using your Ant buildfile if you want. If you want some kind of CLI build tool, you can also consider Maven, as it has plugins that allow you to create Android applications.

+4
source share

It has been a while (for example, six months), since I used eclipse, so maybe now it is better, but I refused it because I found it to be very slow and buggy. This may be integration with ADT, but several times I spent hours looking for problems that were fixed if I killed and restarted eclipse (and these problems were not fixed if I did a clean eclipse). Having done this several times, I wanted to throw the computer on the wall.

"ant clean" is much simpler and faster than stopping and restarting eclipse.

+3
source share

I would use Eclipse until you are comfortable with the debug build. You can then configure Ant to create a signed release build.

You can configure it to use the same source files as Eclipse, but place the output binaries outside the workspace. You can also set it to use release.keystore, sign it automatically and obfuscate the code at a time.

I set it up for this. I open the command line (DOS field), moving to the projects home directory (\ dev \ projects \ Eclipse \ Project1 say), I type "Ant release", and apk ends in \ dev \ projects \ AntBuilds \ Project1 \ bin as Project1- release.apk.

+2
source share

If you want to get the best of both worlds, you may need to look at the m2cllipse-android-integration Eclipse plug-in, which allows you to use your Maven assembly on the command line in an ADT / Eclipse environment:

https://code.google.com/a/eclipselabs.org/p/m2eclipse-android-integration/

+2
source share

Well, for me this is only a beginner, but I find eclipse a lot easier to work with. Android is quite difficult to get used to (for me), so everything that is laid out in the graphical interface is preferable to the command line. Plus SDK updates and are easier to get.

+1
source share

All Articles