Should I use Maven for an Android App? [closed] Should I use Maven for an Android App? [closed] android android

Should I use Maven for an Android App? [closed]


My teams current task is to develop an Android app. Since it is a small app and also some kind of prototype we decided to evaluate Maven and the Android Eclipse plugin.

In short:After two developers spent three days, we were not able to gain the Android Eclipse plugin functionalities in our Maven project.

  • The R class was not updated according to our resources
  • We were not able to start the application directly from within Eclipse in the emulator and/or an attached device

Because of these issues which impeded our development sincerely we decided to develop the app without Maven.But if any of you knows how to fix these issues I would love to hear a solution!


If you want fast running tests you are nearly forced to use maven. As robolectric is the way to go then. And they said Roboletric is probably easier to set up via maven under Eclipse (they are using IDEA).

That said, did you read this post or that? And what error message exactly did you get?

Typical things I made wrong:

  1. use maven >= 3.0.3 ! And avoid that embedded thing in eclipse. (This was necessary only for robolectric, if I remember correctly)
  2. use ~/.m2/settings.xml as described on the robolectric page to set up the android path
  3. specify your android sdk also properly in the local.properties and under Preferences -> Android -> SDK location
  4. Further read this and that or just try the mavenized robolectric example itself, which worked for me. Import it as existing maven project.
  5. Install the necessary sdk (in my case 2.2_r3) via maven-android-sdk-deployer and

    export ANDROID_HOME=/path/to/android/sdkmvn install -P 2.2
  6. And did I mention this strange tool: m2e-android - not sure why one needs so many stuff with Eclipse ... here you can install it via software updates http://rgladwell.github.com/m2e-android/updates/master/m2e-android/

Hopefully I remembered all steps correctly. Good luck!

Update:

Switching back to normal Android stuff without maven under Eclipse as the IDE makes strange stuff: http://groups.google.com/group/robolectric/browse_thread/thread/ac814076c40d9df1

But the nice thing of this Maven adventure is that I can now easily test and debug my projects via NetBeans :)


As we all know Android Devolopment migrated to Android Studio from Eclipse.

The Android Studio build system consists of an Android plugin for Gradle. Gradle is an advanced build toolkit that manages dependencies and allows you to define custom build logic.

The build system is independent from Android Studio, so you can invoke it from Android Studio or from the command line.

The Android Studio build system supports remote Maven dependencies. As you know, Maven is a popular software project management tool that helps organize project dependencies using repositories.

You can build your Android apps from the command line on your machine from Android Studio,thus by avoiding the mess of plugins as there in Eclipse.

Check out this tutorial for Building Android Apps with Maven.

Refer here for more about Gradle build