2014-04-19 5 views
6

Ich versuche den populären zxing Barcode Scanner zu bauen, indem ich die Anweisungen here bearbeite.Wie behebe ich diese internen Maven Fehler?

Ich habe mehrere Versionen von Maven verwendet, aber unabhängig davon, welche Version ich verwende, wenn ich den Befehl mvn package android:apk wie angewiesen eingeben, bekomme ich seltsame Fehler, die noch nie zuvor von Menschen gesehen wurden.

Fehler:

[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) 
+0

Das Problem scheint von "android-maven-plugin" zu kommen, Sie müssen möglicherweise überprüfen, ob die verwendete Version korrekt ist (in Ihrer pom.xml). Sie können auch Hilfe in ihren Foren/Bugtrackern anfordern (http://code.google.com/p/maven-android-plugin/, https://github.com/jayway/maven-android-plugin). – superbob

Antwort

10

Ändern Sie die Version 3.9.0-rc.2 für Android-Maven-Plugin löste das Problem.