How do you install m2e-android-plugin in Eclipse?

纵然是瞬间 提交于 2019-11-29 10:05:50

I have tried set up a fresh second IDE myself and everything works as expected, suppose you have installed both Android SDK and Maven properly (better to use latest version), these are the only Eclipse plugins required to work with Mavenized Android Project:

  • adt
  • m2e
  • m2e-android

Check out my screenshot Help -> Install New Software... -> what is already installed:

If you follow instructions from this page starting with a new project, the <packaging> error is most likely due to earlie version of maven-release-plugin (if you do not explicitly specify one). By hovering mouse on <packaging> element in pom.xml, you should get some hint like:

maven-resources-plugin prior to 2.4 is not supported by m2e. Use maven-resources-plugin version 2.4 or later.

Adding the following plugin under <plugins>:

<plugin>
  <artifactId>maven-resources-plugin</artifactId>
  <version>2.5</version>
</plugin>

Then Right-click on new project and select Maven -> Update Project Configuration, this should fix all error and give you a working example.

I had the same problem trying to install the android m2e in eclipse JUNO. Then tried to install through "Install new software" wizard, instead of market place.

Add the following as an update site and select "Android For Maven eclipse" from the listed softwares and install.

http://rgladwell.github.com/m2e-android/updates - Thanks to @NullNoname for providing the update site.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!