我有一个使用Maven的Android项目。
它适用于运行Windows XP的旧计算机。但现在在我的另一台计算机上运行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;
我正在运行Windows 7 32位。
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"
答案 0 :(得分:10)
找到解决方案。我使用apache-maven-3.0.5而不是3.1.0。
答案 1 :(得分:7)
您可以使用3.8.0的android-maven-plugin并继续使用maven 3.1.1。它解决了这个问题。