19

Does Android Studio seamlessly support Maven projects?

Or do you have to download plugins and jump through hurdles (a la Eclipse)? Or can you use Maven at all?

mamills
  • 1,786
  • 1
  • 15
  • 15
  • Even though this is hiding down in the comments I'll bring it up here for quicker help: "That is correct AS 2 does not support Maven at all". – tir38 Sep 15 '16 at 21:13

4 Answers4

7

I heard in the keynote that, yes, it has support for subversion, git, maven, etc.

And it's based on IDEA, which had support for maven bundled for quite a long time.

http://www.jetbrains.com/idea/features/ant_maven.html

Archimedes Trajano
  • 35,625
  • 19
  • 175
  • 265
Deses
  • 1,074
  • 2
  • 12
  • 25
6

Here is the "import project" screen shot. Note the "Maven project file (pom.xml)" at the top. Android Studio is based on IDEA, which supports Maven natively.

Android Studio import project screen shot

Barett
  • 5,826
  • 6
  • 51
  • 55
3

Starting from Android Studio version 0.8.14 and newer there is no default maven runner. Nevertheless you are still able to use AndroidStudio with maven projects. You just need to make sure AndroidStudio have a path to Maven - on Mac Android Studio Preferences -> Maven -> Maven home directory. After set up simply click on File -> Open... and select a pom file of your android project. To make your life simpler when running a maven with different setup of goals and profiles I suggest to install Android Studio Plugin called Maven Runner which will give you ability to create MVN configuration with autocomplete feature for all goals and profiles from you pom file.
Maven Runner - Run Configuration

Michal
  • 6,453
  • 2
  • 24
  • 23
0

Tried using the current version 0.5.3 of Android Studio on an existing project I had using Eclipse. The project imports correctly and generates the necessary APKs.

However, you have to create a new Run configuration manually. It's not like in Eclipse where you can right-click and Run... on the project.

Archimedes Trajano
  • 35,625
  • 19
  • 175
  • 265