简体   繁体   English

如何解决这些Maven内部错误?

[英]How do I resolve these Maven internal errors?

I am trying to build the popular zxing barcode scanner, following the directions listed here . 我正在尝试按照此处列出的指示构建流行的zxing条形码扫描仪。

I have used multiple versions of Maven, but regardless of what version I use, when I type the command mvn package android:apk as instructed, I get strange errors that have never been seen by man before. 我已经使用了多个版本的Maven,但无论我使用什么版本,当我按照指示键入命令mvn package android:apk ,我会收到以前从未见过的奇怪错误。

Errors: 错误:

 [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: sun.misc.Launcher$AppClassLoader@9664a1]
[ERROR] at ClassRealm[extension>com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.9.0-rc.1, parent: sun.misc.Launcher$AppClassLoader@9664a1]
[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: sun.misc.Launcher$AppClassLoader@9664a1]
[ERROR] at ClassRealm[extension>com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.9.0-rc.1, parent: sun.misc.Launcher$AppClassLoader@9664a1]
[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: sun.misc.Launcher$AppClassLoader@9664a1]
  at ClassRealm[extension>com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.9.0-rc.1, parent: sun.misc.Launcher$AppClassLoader@9664a1]
  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: sun.misc.Launcher$AppClassLoader@9664a1]
  at ClassRealm[extension>com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.9.0-rc.1, parent: sun.misc.Launcher$AppClassLoader@9664a1]
  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: sun.misc.Launcher$AppClassLoader@9664a1]
  at ClassRealm[extension>com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.9.0-rc.1, parent: sun.misc.Launcher$AppClassLoader@9664a1]
  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: sun.misc.Launcher$AppClassLoader@9664a1]
  at ClassRealm[extension>com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.9.0-rc.1, parent: sun.misc.Launcher$AppClassLoader@9664a1]
  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)

将版本更改为3.9.0-rc.2 for android-maven-plugin解决了这个问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在使用Maven时,如何解决在Eclipse中显示但不在Eclipse中显示项目的编译错误? - How do I resolve compilation errors that show up on classes but not projects in Eclipse when using Maven? 如何解决Maven中的依赖冲突? - How do I resolve a dependency conflict in Maven? 如何使用Nexus存储库解决Maven中的依赖性错误 - How to resolve dependency errors in Maven with Nexus repository 升级 Spring Boot 时如何解决 jstl 错误 - How do I resolve jstl errors when upgrading Spring Boot 如何解决 maven 多模块项目中的 java.lang.IllegalAccessError - how do I resolve java.lang.IllegalAccessError in a maven multi-module project 如何解决Android Studio上编译时未找到与.class相关的文件的错误? - How do I resolve .class-related file not found errors in Android Studio on compile? 如何解决NativeScript Skidekick中与模拟器Java有关的错误 - How do I resolve emulator java-related errors in NativeScript Skidekick 出现MojoExecutor错误时,如何使Maven在RHEL 7.x中工作? - How do I get Maven to work in RHEL 7.x when there are MojoExecutor errors? 无法解决Maven项目Eclipse光子中的错误 - Unable to resolve errors in maven project eclipse photon 如何解决Maven依赖 - How to resolve Maven dependency
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM