3

在 Eclipse 中构建我的 android 项目时遇到问题。错误是:

Build errors for MyAndroidProject; org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.1.1:generate-sources (default-generate-sources) on project MyAndroidProject: The plugin com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.1.1 requires Maven version [3.0.3,)

这是我的 Pom.xml 插件:

    <plugins>
        <plugin>
            <groupId>com.jayway.maven.plugins.android.generation2</groupId>
            <artifactId>android-maven-plugin</artifactId>
            <version>3.1.1</version>
            <extensions>true</extensions>
        </plugin>
    </plugins>

关键是我在本地环境和 Eclipse 中使用 maven 3.0.3。

Apache Maven 3.0.3 (r1075438; 2011-02-28 18:31:09+0100)

知道这个错误来自哪里以及如何解决它吗?

提前谢谢了 ;)

鲁本

4

1 回答 1

1

If you are running the build from a custom run configuration in Eclipse you may need to specify what Maven runtime to use. Try downloading Maven 3.0.4 and add it as a custom Maven runtime in Eclipse then select the 3.0.4 Maven runtime under Run Configurations for your particular build.

I remember having problems also with the embedded 3.0.3 while 3.0.4 works fine.

于 2012-09-15T21:42:51.743 回答