Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Failed to execute goal com.jayway.maven.plugins.android.generation2

I have an Android project that uses Maven.

It works with my old computer running Windows XP. but now in my other computer I get this error when running maven:

Failed to execute goal com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.6.0:generate-sources (default-generate-sources) on project my-android-application: Execution default-generate-sources of goal com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.6.0:generate-sources failed: A required class was missing while executing com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.6.0:generate-sources: Lorg/sonatype/aether/RepositorySystem;

I am running Windows 7 32-bit.

C:\Checkouts\Project\Src\Android\BuildResources>mvn -version
Apache Maven 3.1.0 (893ca28a1da9d5f51ac03827af98bb730128f9f2; 2013-06-28 10:15:32+0800)
Maven home: C:\Programs\apache-maven-3.1.0
Java version: 1.6.0_33, vendor: Sun Microsystems Inc.
Java home: C:\Program Files\Java\jdk1.6.0_33\jre
Default locale: en_SG, platform encoding: Cp1252
OS name: "windows 7", version: "6.1", arch: "x86", family: "windows"
like image 906
Mark Pazon Avatar asked Oct 04 '13 06:10

Mark Pazon


2 Answers

Found the solution. I used apache-maven-3.0.5 instead of 3.1.0.

Android Maven Plugin is not compatible with Maven 3.1

like image 152
Mark Pazon Avatar answered Sep 22 '22 12:09

Mark Pazon


You can use 3.8.0 of android-maven-plugin and continue with maven 3.1.1. It solves this.

like image 20
thalespf Avatar answered Sep 23 '22 12:09

thalespf