我的应用程序有一个依赖项,其中包含用Scala编写的代码和一些Akka代码。如果省略此依赖项,它运行完全正常。但是,如果包含它并运行项目,则会发生以下错误:
Exception in thread "main" java.lang.IllegalArgumentException: Unexpected private interface method lift.scala/reflect/api/StandardLiftables$StandardLiftableInstances : (Ljava/lang/Object;Lscala/reflect/api/Liftables$Liftable;)Lscala/reflect/api/Trees$TreeApi;
at com.google.common.base.Preconditions.checkArgument(Preconditions.java:399)
at com.google.devtools.build.android.desugar.InterfaceDesugaring.visitMethod(InterfaceDesugaring.java:206)
at org.objectweb.asm.ClassVisitor.visitMethod(ClassVisitor.java:327)
at com.google.devtools.build.android.desugar.LambdaDesugaring.visitMethod(LambdaDesugaring.java:193)
at org.objectweb.asm.ClassReader.readMethod(ClassReader.java:1020)
at org.objectweb.asm.ClassReader.accept(ClassReader.java:698)
at org.objectweb.asm.ClassReader.accept(ClassReader.java:500)
at com.google.devtools.build.android.desugar.Desugar.desugarClassesInInput(Desugar.java:477)
at com.google.devtools.build.android.desugar.Desugar.desugarOneInput(Desugar.java:361)
at com.google.devtools.build.android.desugar.Desugar.desugar(Desugar.java:314)
at com.google.devtools.build.android.desugar.Desugar.main(Desugar.java:711)
Exception in thread "main" java.lang.IllegalArgumentException: Unexpected private interface method load.scala/compat/java8/collectionImpl/TryStepper : ()Z
at com.google.common.base.Preconditions.checkArgument(Preconditions.java:399)
at com.google.devtools.build.android.desugar.InterfaceDesugaring.visitMethod(InterfaceDesugaring.java:206)
at org.objectweb.asm.ClassVisitor.visitMethod(ClassVisitor.java:327)
at com.google.devtools.build.android.desugar.LambdaDesugaring.visitMethod(LambdaDesugaring.java:193)
at org.objectweb.asm.ClassReader.readMethod(ClassReader.java:1020)
at org.objectweb.asm.ClassReader.accept(ClassReader.java:698)
at org.objectweb.asm.ClassReader.accept(ClassReader.java:500)
at com.google.devtools.build.android.desugar.Desugar.desugarClassesInInput(Desugar.java:477)
at com.google.devtools.build.android.desugar.Desugar.desugarOneInput(Desugar.java:361)
at com.google.devtools.build.android.desugar.Desugar.desugar(Desugar.java:314)
at com.google.devtools.build.android.desugar.Desugar.main(Desugar.java:711)
Exception in thread "main" java.lang.IllegalArgumentException: Unexpected private interface method cancelSelf.akka/stream/actor/ActorPublisher : ()V
at com.google.common.base.Preconditions.checkArgument(Preconditions.java:399)
at com.google.devtools.build.android.desugar.InterfaceDesugaring.visitMethod(InterfaceDesugaring.java:206)
at org.objectweb.asm.ClassVisitor.visitMethod(ClassVisitor.java:327)
at com.google.devtools.build.android.desugar.LambdaDesugaring.visitMethod(LambdaDesugaring.java:193)
at org.objectweb.asm.ClassReader.readMethod(ClassReader.java:1020)
at org.objectweb.asm.ClassReader.accept(ClassReader.java:698)
at org.objectweb.asm.ClassReader.accept(ClassReader.java:500)
at com.google.devtools.build.android.desugar.Desugar.desugarClassesInInput(Desugar.java:477)
at com.google.devtools.build.android.desugar.Desugar.desugarOneInput(Desugar.java:361)
at com.google.devtools.build.android.desugar.Desugar.desugar(Desugar.java:314)
at com.google.devtools.build.android.desugar.Desugar.main(Desugar.java:711)
该项目可能会很好,但运行它会产生上述错误。我如何减轻这种影响并让项目运行,同时记住我需要用于特定功能的库?