1

I have created an android project using maven archetype. When I try clean install from Intellij Idea, I get the following error.

The plugin com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.8.0 requires Maven version 3.1.1

When I try the same thing from a terminal like $ mvn clean install, it works fine. When I change the android-maven-plugin to 3.6.0, it works fine in Idea.

My maven version is 3.1.1

So, I do not understand why I am even facing this problem with Intellij Idea when I have the android-maven-plugin as 3.8.0. Any pointers?

Prasanna
  • 2,593
  • 7
  • 39
  • 53

1 Answers1

2

I fixed the error by configuring my IDE to point to right maven version. By default it was pointing to M2_HOME. In Intellij Idea, I did it like

File->Settings->Maven

and changing the Maven Home Directory to point my 3.1.1 installation path.

One way to find your maven home and version would be

$ mvn --version

You will get something like,

Maven home: /usr/share/apache-maven-3.1.1
Prasanna
  • 2,593
  • 7
  • 39
  • 53