6
我正在嘗試構建受歡迎的zxing條碼掃描器,並遵循列出的方向here。如何解決這些Maven內部錯誤?
我已經使用了Maven的多個版本,但無論使用什麼版本,當我按照指示輸入命令mvn package android:apk
時,我都會遇到以前從未見過的奇怪錯誤。
錯誤:
[ERROR] Internal error: com.google.inject.ProvisionException: Guice provision errors:[ERROR]
[ERROR] 1) No implementation for org.eclipse.aether.impl.VersionResolver was bound.
[ERROR] while locating org.eclipse.aether.internal.impl.DefaultRepositorySystem
[ERROR] at ClassRealm[extension>com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.9.0-rc.1, parent: [email protected]]
[ERROR] at ClassRealm[extension>com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.9.0-rc.1, parent: [email protected]]
[ERROR] while locating org.eclipse.aether.RepositorySystem
[ERROR] while locating com.jayway.maven.plugins.android.phase_prebuild.AarMavenLifecycleParticipant
[ERROR] at ClassRealm[extension>com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.9.0-rc.1, parent: [email protected]]
[ERROR] at ClassRealm[extension>com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.9.0-rc.1, parent: [email protected]]
[ERROR] while locating org.apache.maven.AbstractMavenLifecycleParticipant annotated with @com.google.inject.name.Named(value=AarMavenLifecycleListener)
[ERROR]
[ERROR] 1 error
[ERROR] -> [Help 1]
org.apache.maven.InternalErrorException: Internal error: com.google.inject.ProvisionException: Guice provision errors:
1) No implementation for org.eclipse.aether.impl.VersionResolver was bound.
while locating org.eclipse.aether.internal.impl.DefaultRepositorySystem
at ClassRealm[extension>com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.9.0-rc.1, parent: [email protected]]
at ClassRealm[extension>com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.9.0-rc.1, parent: [email protected]]
while locating org.eclipse.aether.RepositorySystem
while locating com.jayway.maven.plugins.android.phase_prebuild.AarMavenLifecycleParticipant
at ClassRealm[extension>com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.9.0-rc.1, parent: [email protected]]
at ClassRealm[extension>com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.9.0-rc.1, parent: [email protected]]
while locating org.apache.maven.AbstractMavenLifecycleParticipant annotated with @com.google.inject.name.Named(value=AarMavenLifecycleListener)
1 error
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:168)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: com.google.inject.ProvisionException: Guice provision errors:
1) No implementation for org.eclipse.aether.impl.VersionResolver was bound.
while locating org.eclipse.aether.internal.impl.DefaultRepositorySystem
at ClassRealm[extension>com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.9.0-rc.1, parent: [email protected]]
at ClassRealm[extension>com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.9.0-rc.1, parent: [email protected]]
while locating org.eclipse.aether.RepositorySystem
while locating com.jayway.maven.plugins.android.phase_prebuild.AarMavenLifecycleParticipant
at ClassRealm[extension>com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.9.0-rc.1, parent: [email protected]]
at ClassRealm[extension>com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.9.0-rc.1, parent: [email protected]]
while locating org.apache.maven.AbstractMavenLifecycleParticipant annotated with @com.google.inject.name.Named(value=AarMavenLifecycleListener)
1 error
at com.google.inject.internal.InjectorImpl$3.get(InjectorImpl.java:999)
at org.sonatype.guice.bean.locators.LazyBeanEntry.getValue(LazyBeanEntry.java:83)
這個問題似乎來自「android-maven-plugin」,您可能需要檢查使用的版本是否正確(在您的pom.xml中)。您也可以請求他們的論壇/ bug trackers幫助(http://code.google.com/p/maven-android-plugin/,https://github.com/jayway/maven-android-plugin) – superbob