我正在尝试设置在 Eclipse 中为我的 Android 项目使用 Maven 和 pom.xml 文件。我安装了 Eclipse Indigo(包括 m2e),安装了 Android SDK,安装了 ADT。我正在努力理解“安装 m2e-android-plugin”的含义(我总是被带到这个页面,它提供了安装它的说明,但我无法遵循)具体来说,当我浏览那个页面上的说明时,完成第 2 部分中的所有步骤后,我的结构没有“Maven 依赖项”,并且我的 pom.xml 文件显示以下错误:
Project build error: Unresolveable build extension: Plugin
com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.1.1 or one of its dependencies could
not be resolved: The following artifacts could not be resolved:
com.jayway.maven.plugins.android.generation2:android-maven-plugin:jar:3.1.1,
com.android.ddmlib:ddmlib:jar:r16, org.sonatype.sisu:sisu-inject-bean:jar:2.1.1,
org.sonatype.sisu:sisu-guice:jar:no_aop:2.9.4, org.codehaus.plexus:plexus- archiver:jar:2.0.1, junit:junit:jar:3.8.1,
org.codehaus.plexus:plexus-io:jar:2.0.1, org.codehaus.plexus:plexus-utils:jar:3.0, commons-jxpath:commons-
jxpath:jar:1.3, commons-io:commons-io:jar:2.0.1, org.ow2.asm:asm:jar:4.0, commons-lang:commons-lang:jar:
2.6, org.sonatype.aether:aether-util:jar:1.12: Failure to transfer
com.jayway.maven.plugins.android.generation2:android-maven-plugin:jar:3.1.1 from http://repo1.maven.org/
maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central
has elapsed or updates are forced. Original error: Could not transfer artifact
com.jayway.maven.plugins.android.generation2:android-maven-plugin:jar:3.1.1 from/to central (http://
repo1.maven.org/maven2): No response received after 60000
随着:
Project build error: Unknown packaging: apk
在线上
<packaging>apk</packaging>