Android studio gradle重复类错误

Android studio gradle重复类错误,android,android-studio,gradle,android-gradle-plugin,Android,Android Studio,Gradle,Android Gradle Plugin,简短的。 目前,我正在构建一个android应用程序,它有两个模块,应用程序模块和另一个称为“Jumble”的模块,应用程序模块依赖于Jumble模块, 混乱模块依赖的依赖关系与应用程序模块依赖关系冲突,导致“重复类”渐变错误 在Jumble模块中,我使用protobuf java库,在应用程序模块中,我使用FirebaseFirestore,它内部包含一个protobuf lite库,这会导致重复类错误 注意:Jumble模块不能使用protobuf的lite版本与Firebase proto

简短的。 目前,我正在构建一个android应用程序,它有两个模块,应用程序模块和另一个称为“Jumble”的模块,应用程序模块依赖于Jumble模块, 混乱模块依赖的依赖关系与应用程序模块依赖关系冲突,导致“重复类”渐变错误

在Jumble模块中,我使用protobuf java库,在应用程序模块中,我使用FirebaseFirestore,它内部包含一个protobuf lite库,这会导致重复类错误

注意:Jumble模块不能使用protobuf的lite版本与Firebase protobuf lite版本统一,因为Jumble模块有更高级的代码,需要protobuf java完整版本

为了解决这个问题,我在Jumble模块中使用了关键字“implementation”而不是“api”,使“protobuf java”库仅对此模块专用,并防止与应用模块共享,但不幸的是,重建失败后,Gradle仍然显示此库与应用模块Firestore库重复

我尝试了另一种方法,在应用程序模块中,我添加了排除规则,重建成功,应用程序启动,但在某个点上,混乱模块代码崩溃,因为使用了“NoSuchMethodException”,这意味着“protobuf java”也未编译并从混乱模块中排除

implementation(project(":Jumble")) {

    exclude group: 'com.google.protobuf', module: 'protobuf-java'

}
现在我搜索了很多,尝试了不同的解决方案,但仍然无法修复这个重复的错误

这是Gradle显示的重复错误

Duplicate class com.google.protobuf.AbstractMessageLite found in modules protobuf-java-3.0.0.jar (com.google.protobuf:protobuf-java:3.0.0) and protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-lite:3.0.1)
Duplicate class com.google.protobuf.AbstractMessageLite$Builder found in modules protobuf-java-3.0.0.jar (com.google.protobuf:protobuf-java:3.0.0) and protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-lite:3.0.1)
Duplicate class com.google.protobuf.AbstractMessageLite$Builder$LimitedInputStream found in modules protobuf-java-3.0.0.jar (com.google.protobuf:protobuf-java:3.0.0) and protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-lite:3.0.1)
Duplicate class com.google.protobuf.AbstractParser found in modules protobuf-java-3.0.0.jar (com.google.protobuf:protobuf-java:3.0.0) and protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-lite:3.0.1)
Duplicate class com.google.protobuf.AbstractProtobufList found in modules protobuf-java-3.0.0.jar (com.google.protobuf:protobuf-java:3.0.0) and protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-lite:3.0.1)
Duplicate class com.google.protobuf.Any found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and protobuf-java-3.0.0.jar (com.google.protobuf:protobuf-java:3.0.0)
Duplicate class com.google.protobuf.Any$1 found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and protobuf-java-3.0.0.jar (com.google.protobuf:protobuf-java:3.0.0)
Duplicate class com.google.protobuf.Any$Builder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and protobuf-java-3.0.0.jar (com.google.protobuf:protobuf-java:3.0.0)
Duplicate class com.google.protobuf.AnyProto found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and protobuf-java-3.0.0.jar (com.google.protobuf:protobuf-java:3.0.0)
Duplicate class com.google.protobuf.Api found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and protobuf-java-3.0.0.jar (com.google.protobuf:protobuf-java:3.0.0)
Duplicate class com.google.protobuf.Api$1 found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and protobuf-java-3.0.0.jar (com.google.protobuf:protobuf-java:3.0.0)
Duplicate class com.google.protobuf.Api$Builder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and protobuf-java-3.0.0.jar (com.google.protobuf:protobuf-java:3.0.0)
Duplicate class com.google.protobuf.ApiOrBuilder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and protobuf-java-3.0.0.jar (com.google.protobuf:protobuf-java:3.0.0)
Duplicate class com.google.protobuf.ApiProto found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and protobuf-java-3.0.0.jar (com.google.protobuf:protobuf-java:3.0.0)
Duplicate class com.google.protobuf.BoolValue found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and protobuf-java-3.0.0.jar (com.google.protobuf:protobuf-java:3.0.0)
Duplicate class com.google.protobuf.BoolValue$1 found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and protobuf-java-3.0.0.jar (com.google.protobuf:protobuf-java:3.0.0)
Duplicate class com.google.protobuf.BoolValue$Builder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and protobuf-java-3.0.0.jar (com.google.protobuf:protobuf-java:3.0.0)
Duplicate class com.google.protobuf.BoolValueOrBuilder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and protobuf-java-3.0.0.jar (com.google.protobuf:protobuf-java:3.0.0)
Duplicate class com.google.protobuf.BooleanArrayList found in modules protobuf-java-3.0.0.jar (com.google.protobuf:protobuf-java:3.0.0) and protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-lite:3.0.1)
Duplicate class com.google.protobuf.ByteBufferWriter found in modules protobuf-java-3.0.0.jar (com.google.protobuf:protobuf-java:3.0.0) and protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-lite:3.0.1)
Duplicate class com.google.protobuf.ByteOutput found in modules protobuf-java-3.0.0.jar (com.google.protobuf:protobuf-java:3.0.0) and protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-lite:3.0.1)
Duplicate class com.google.protobuf.ByteString found in modules protobuf-java-3.0.0.jar (com.google.protobuf:protobuf-java:3.0.0) and protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-lite:3.0.1)
Duplicate class com.google.protobuf.ByteString$1 found in modules protobuf-java-3.0.0.jar (com.google.protobuf:protobuf-java:3.0.0) and protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-lite:3.0.1)
Duplicate class com.google.protobuf.ByteString$ArraysByteArrayCopier found in modules protobuf-java-3.0.0.jar (com.google.protobuf:protobuf-java:3.0.0) and protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-lite:3.0.1)
Duplicate class com.google.protobuf.ByteString$BoundedByteString found in modules protobuf-java-3.0.0.jar (com.google.protobuf:protobuf-java:3.0.0) and protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-lite:3.0.1)
Duplicate class com.google.protobuf.ByteString$ByteArrayCopier found in modules protobuf-java-3.0.0.jar (com.google.protobuf:protobuf-java:3.0.0) and protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-lite:3.0.1)
Duplicate class com.google.protobuf.ByteString$ByteIterator found in modules protobuf-java-3.0.0.jar (com.google.protobuf:protobuf-java:3.0.0) and protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-lite:3.0.1)
Duplicate class com.google.protobuf.ByteString$CodedBuilder found in modules protobuf-java-3.0.0.jar (com.google.protobuf:protobuf-java:3.0.0) and protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-lite:3.0.1)
Duplicate class com.google.protobuf.ByteString$LeafByteString found in modules protobuf-java-3.0.0.jar (com.google.protobuf:protobuf-java:3.0.0) and protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-lite:3.0.1)
Duplicate class com.google.protobuf.ByteString$LiteralByteString found in modules protobuf-java-3.0.0.jar (com.google.protobuf:protobuf-java:3.0.0) and protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-lite:3.0.1)
Duplicate class com.google.protobuf.ByteString$Output found in modules protobuf-java-3.0.0.jar (com.google.protobuf:protobuf-java:3.0.0) and protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-lite:3.0.1)
Duplicate class com.google.protobuf.ByteString$SystemByteArrayCopier found in modules protobuf-java-3.0.0.jar (com.google.protobuf:protobuf-java:3.0.0) and protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-lite:3.0.1)
Duplicate class com.google.protobuf.BytesValue found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and protobuf-java-3.0.0.jar (com.google.protobuf:protobuf-java:3.0.0)
Duplicate class com.google.protobuf.BytesValue$1 found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and protobuf-java-3.0.0.jar (com.google.protobuf:protobuf-java:3.0.0)
Duplicate class com.google.protobuf.BytesValue$Builder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and protobuf-java-3.0.0.jar (com.google.protobuf:protobuf-java:3.0.0)
Duplicate class com.google.protobuf.BytesValueOrBuilder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and protobuf-java-3.0.0.jar (com.google.protobuf:protobuf-java:3.0.0)
Duplicate class com.google.protobuf.CodedInputStream found in modules protobuf-java-3.0.0.jar (com.google.protobuf:protobuf-java:3.0.0) and protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-lite:3.0.1)
Duplicate class com.google.protobuf.CodedInputStream$RefillCallback found in modules protobuf-java-3.0.0.jar (com.google.protobuf:protobuf-java:3.0.0) and protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-lite:3.0.1)
Duplicate class com.google.protobuf.CodedInputStream$SkippedDataSink found in modules protobuf-java-3.0.0.jar (com.google.protobuf:protobuf-java:3.0.0) and protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-lite:3.0.1)
Duplicate class com.google.protobuf.CodedOutputStream found in modules protobuf-java-3.0.0.jar (com.google.protobuf:protobuf-java:3.0.0) and protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-lite:3.0.1)
Duplicate class com.google.protobuf.CodedOutputStream$1 found in modules protobuf-java-3.0.0.jar (com.google.protobuf:protobuf-java:3.0.0) and protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-lite:3.0.1)
Duplicate class com.google.protobuf.CodedOutputStream$AbstractBufferedEncoder found in modules protobuf-java-3.0.0.jar (com.google.protobuf:protobuf-java:3.0.0) and protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-lite:3.0.1)
Duplicate class com.google.protobuf.CodedOutputStream$ArrayEncoder found in modules protobuf-java-3.0.0.jar (com.google.protobuf:protobuf-java:3.0.0) and protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-lite:3.0.1)
Duplicate class com.google.protobuf.CodedOutputStream$ByteOutputEncoder found in modules protobuf-java-3.0.0.jar (com.google.protobuf:protobuf-java:3.0.0) and protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-lite:3.0.1)
Duplicate class com.google.protobuf.CodedOutputStream$NioEncoder found in modules protobuf-java-3.0.0.jar (com.google.protobuf:protobuf-java:3.0.0) and protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-lite:3.0.1)
Duplicate class com.google.protobuf.CodedOutputStream$NioHeapEncoder found in modules protobuf-java-3.0.0.jar (com.google.protobuf:protobuf-java:3.0.0) and protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-lite:3.0.1)
Duplicate class com.google.protobuf.CodedOutputStream$OutOfSpaceException found in modules protobuf-java-3.0.0.jar (com.google.protobuf:protobuf-java:3.0.0) and protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-lite:3.0.1)
Duplicate class com.google.protobuf.CodedOutputStream$OutputStreamEncoder found in modules protobuf-java-3.0.0.jar (com.google.protobuf:protobuf-java:3.0.0) and protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-lite:3.0.1)
Duplicate class com.google.protobuf.DescriptorProtos found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and protobuf-java-3.0.0.jar (com.google.protobuf:protobuf-java:3.0.0)
Duplicate class com.google.protobuf.DescriptorProtos$1 found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and protobuf-java-3.0.0.jar (com.google.protobuf:protobuf-java:3.0.0)
Duplicate class com.google.protobuf.DescriptorProtos$DescriptorProto found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and protobuf-java-3.0.0.jar (com.google.protobuf:protobuf-java:3.0.0)
Duplicate class com.google.protobuf.DescriptorProtos$DescriptorProto$Builder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and protobuf-java-3.0.0.jar (com.google.protobuf:protobuf-java:3.0.0)
Duplicate class com.google.protobuf.DescriptorProtos$DescriptorProto$ExtensionRange found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and protobuf-java-3.0.0.jar (com.google.protobuf:protobuf-java:3.0.0)
Duplicate class com.google.protobuf.DescriptorProtos$DescriptorProto$ExtensionRange$Builder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and protobuf-java-3.0.0.jar (com.google.protobuf:protobuf-java:3.0.0)
Duplicate class com.google.protobuf.DescriptorProtos$DescriptorProto$ExtensionRangeOrBuilder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and protobuf-java-3.0.0.jar (com.google.protobuf:protobuf-java:3.0.0)
Duplicate class com.google.protobuf.DescriptorProtos$DescriptorProto$ReservedRange found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and protobuf-java-3.0.0.jar (com.google.protobuf:protobuf-java:3.0.0)
Duplicate class com.google.protobuf.DescriptorProtos$DescriptorProto$ReservedRange$Builder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and protobuf-java-3.0.0.jar (com.google.protobuf:protobuf-java:3.0.0)
Duplicate class com.google.protobuf.DescriptorProtos$DescriptorProto$ReservedRangeOrBuilder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and protobuf-java-3.0.0.jar (com.google.protobuf:protobuf-java:3.0.0)
Duplicate class com.google.protobuf.DescriptorProtos$DescriptorProtoOrBuilder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and protobuf-java-3.0.0.jar (com.google.protobuf:protobuf-java:3.0.0)
Duplicate class com.google.protobuf.DescriptorProtos$EnumDescriptorProto found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and protobuf-java-3.0.0.jar (com.google.protobuf:protobuf-java:3.0.0)
Duplicate class com.google.protobuf.DescriptorProtos$EnumDescriptorProto$Builder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and protobuf-java-3.0.0.jar (com.google.protobuf:protobuf-java:3.0.0)
Duplicate class com.google.protobuf.DescriptorProtos$EnumDescriptorProtoOrBuilder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and protobuf-java-3.0.0.jar (com.google.protobuf:protobuf-java:3.0.0)
Duplicate class com.google.protobuf.DescriptorProtos$EnumOptions found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and protobuf-java-3.0.0.jar (com.google.protobuf:protobuf-java:3.0.0)
Duplicate class com.google.protobuf.DescriptorProtos$EnumOptions$Builder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and protobuf-java-3.0.0.jar (com.google.protobuf:protobuf-java:3.0.0)
Duplicate class com.google.protobuf.DescriptorProtos$EnumOptionsOrBuilder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and protobuf-java-3.0.0.jar (com.google.protobuf:protobuf-java:3.0.0)
Duplicate class com.google.protobuf.DescriptorProtos$EnumValueDescriptorProto found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and protobuf-java-3.0.0.jar (com.google.protobuf:protobuf-java:3.0.0)
Duplicate class com.google.protobuf.DescriptorProtos$EnumValueDescriptorProto$Builder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and protobuf-java-3.0.0.jar (com.google.protobuf:protobuf-java:3.0.0)
Duplicate class com.google.protobuf.DescriptorProtos$EnumValueDescriptorProtoOrBuilder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and protobuf-java-3.0.0.jar (com.google.protobuf:protobuf-java:3.0.0)
Duplicate class com.google.protobuf.DescriptorProtos$EnumValueOptions found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and protobuf-java-3.0.0.jar (com.google.protobuf:protobuf-java:3.0.0)
Duplicate class com.google.protobuf.DescriptorProtos$EnumValueOptions$Builder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and protobuf-java-3.0.0.jar (com.google.protobuf:protobuf-java:3.0.0)
Duplicate class com.google.protobuf.DescriptorProtos$EnumValueOptionsOrBuilder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and protobuf-java-3.0.0.jar (com.google.protobuf:protobuf-java:3.0.0)
Duplicate class com.google.protobuf.DescriptorProtos$FieldDescriptorProto found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and protobuf-java-3.0.0.jar (com.google.protobuf:protobuf-java:3.0.0)
Duplicate class com.google.protobuf.DescriptorProtos$FieldDescriptorProto$Builder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and protobuf-java-3.0.0.jar (com.google.protobuf:protobuf-java:3.0.0)
Duplicate class com.google.protobuf.DescriptorProtos$FieldDescriptorProto$Label found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and protobuf-java-3.0.0.jar (com.google.protobuf:protobuf-java:3.0.0)
Duplicate class com.google.protobuf.DescriptorProtos$FieldDescriptorProto$Label$1 found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and protobuf-java-3.0.0.jar (com.google.protobuf:protobuf-java:3.0.0)
Duplicate class com.google.protobuf.DescriptorProtos$FieldDescriptorProto$Type found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and protobuf-java-3.0.0.jar (com.google.protobuf:protobuf-java:3.0.0)
Duplicate class com.google.protobuf.DescriptorProtos$FieldDescriptorProto$Type$1 found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and protobuf-java-3.0.0.jar (com.google.protobuf:protobuf-java:3.0.0)
Duplicate class com.google.protobuf.DescriptorProtos$FieldDescriptorProtoOrBuilder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and protobuf-java-3.0.0.jar (com.google.protobuf:protobuf-java:3.0.0)
Duplicate class com.google.protobuf.DescriptorProtos$FieldOptions found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and protobuf-java-3.0.0.jar (com.google.protobuf:protobuf-java:3.0.0)
Duplicate class com.google.protobuf.DescriptorProtos$FieldOptions$Builder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and protobuf-java-3.0.0.jar (com.google.protobuf:protobuf-java:3.0.0)
Duplicate class com.google.protobuf.DescriptorProtos$FieldOptions$JSType found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and protobuf-java-3.0.0.jar (com.google.protobuf:protobuf-java:3.0.0)
Duplicate class com.google.protobuf.DescriptorProtos$FieldOptions$JSType$1 found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and protobuf-java-3.0.0.jar (com.google.protobuf:protobuf-java:3.0.0)
Duplicate class com.google.protobuf.DescriptorProtos$FieldOptionsOrBuilder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and protobuf-java-3.0.0.jar (com.google.protobuf:protobuf-java:3.0.0)
Duplicate class com.google.protobuf.DescriptorProtos$FileDescriptorProto found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and protobuf-java-3.0.0.jar (com.google.protobuf:protobuf-java:3.0.0)
Duplicate class com.google.protobuf.DescriptorProtos$FileDescriptorProto$Builder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and protobuf-java-3.0.0.jar (com.google.protobuf:protobuf-java:3.0.0)
Duplicate class com.google.protobuf.DescriptorProtos$FileDescriptorProtoOrBuilder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and protobuf-java-3.0.0.jar (com.google.protobuf:protobuf-java:3.0.0)
Duplicate class com.google.protobuf.DescriptorProtos$FileDescriptorSet found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and protobuf-java-3.0.0.jar (com.google.protobuf:protobuf-java:3.0.0)
Duplicate class com.google.protobuf.DescriptorProtos$FileDescriptorSet$Builder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and protobuf-java-3.0.0.jar (com.google.protobuf:protobuf-java:3.0.0)
Duplicate class com.google.protobuf.DescriptorProtos$FileDescriptorSetOrBuilder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and protobuf-java-3.0.0.jar (com.google.protobuf:protobuf-java:3.0.0)
Duplicate class com.google.protobuf.DescriptorProtos$FileOptions found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and protobuf-java-3.0.0.jar (com.google.protobuf:protobuf-java:3.0.0)
Duplicate class com.google.protobuf.DescriptorProtos$FileOptions$Builder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and protobuf-java-3.0.0.jar (com.google.protobuf:protobuf-java:3.0.0)
Duplicate class com.google.protobuf.DescriptorProtos$FileOptions$OptimizeMode found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and protobuf-java-3.0.0.jar (com.google.protobuf:protobuf-java:3.0.0)
Duplicate class com.google.protobuf.DescriptorProtos$FileOptions$OptimizeMode$1 found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and protobuf-java-3.0.0.jar (com.google.protobuf:protobuf-java:3.0.0)
Duplicate class com.google.protobuf.DescriptorProtos$FileOptionsOrBuilder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and protobuf-java-3.0.0.jar (com.google.protobuf:protobuf-java:3.0.0)
Duplicate class com.google.protobuf.DescriptorProtos$GeneratedCodeInfo found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and protobuf-java-3.0.0.jar (com.google.protobuf:protobuf-java:3.0.0)
Duplicate class com.google.protobuf.DescriptorProtos$GeneratedCodeInfo$Annotation found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and protobuf-java-3.0.0.jar (com.google.protobuf:protobuf-java:3.0.0)
Duplicate class com.google.protobuf.DescriptorProtos$GeneratedCodeInfo$Annotation$Builder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and protobuf-java-3.0.0.jar (com.google.protobuf:protobuf-java:3.0.0)
Duplicate class com.google.protobuf.DescriptorProtos$GeneratedCodeInfo$AnnotationOrBuilder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and protobuf-java-3.0.0.jar (com.google.protobuf:protobuf-java:3.0.0)
Duplicate class com.google.protobuf.DescriptorProtos$GeneratedCodeInfo$Builder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and protobuf-java-3.0.0.jar (com.google.protobuf:protobuf-java:3.0.0)
Duplicate class com.google.protobuf.DescriptorProtos$GeneratedCodeInfoOrBuilder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and protobuf-java-3.0.0.jar (com.google.protobuf:protobuf-java:3.0.0)
Duplicate class com.google.protobuf.DescriptorProtos$MessageOptions found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and protobuf-java-3.0.0.jar (com.google.protobuf:protobuf-java:3.0.0)
Duplicate class com.google.protobuf.DescriptorProtos$MessageOptions$Builder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and protobuf-java-3.0.0.jar (com.google.protobuf:protobuf-java:3.0.0)
Duplicate class com.google.protobuf.DescriptorProtos$MessageOptionsOrBuilder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and protobuf-java-3.0.0.jar (com.google.protobuf:protobuf-java:3.0.0)
Duplicate class com.google.protobuf.DescriptorProtos$MethodDescriptorProto found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and protobuf-java-3.0.0.jar (com.google.protobuf:protobuf-java:3.0.0)
Duplicate class com.google.protobuf.DescriptorProtos$MethodDescriptorProto$Builder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and protobuf-java-3.0.0.jar (com.google.protobuf:protobuf-java:3.0.0)
Duplicate class com.google.protobuf.DescriptorProtos$MethodDescriptorProtoOrBuilder found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and protobuf-java-3.0.0.jar (com.google.protobuf:protobuf-java:3.0.0)
Duplicate class com.google.protobuf.DescriptorProtos$MethodOptions found in modules classes.jar (com.google.firebase:protolite-well-known-types:16.0.1) and protobuf-java-3.0.0.jar (com.google.protobuf:protobuf-java:3.0.0)(com.google.protobuf:protobuf-lite:3.0.1)
Duplicate class com.google.protobuf.SmallSortedMap$EmptySet$2 found in modules protobuf-java-3.0.0.jar (com.google.protobuf:protobuf-java:3.0.0) and protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-lite:3.0.1)
Go to the documentation to learn how to Fix dependency resolution errors.
应用程序模块渐变文件

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'io.fabric'

android {
compileSdkVersion 28
defaultConfig {
    applicationId "com.app.demo"
    minSdkVersion 21
    targetSdkVersion 28
    multiDexEnabled true
    versionCode 1
    versionName "1.0"
    testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

    kapt {
        arguments {
            arg("room.schemaLocation", "$projectDir/schemas".toString())
        }
    }

}


lintOptions {
    abortOnError false
}

buildTypes {
    release {
        shrinkResources false
        minifyEnabled false
        signingConfig signingConfigs.publicVerReleaseSigningKey
        proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
    }
}

configurations {
    cleanedAnnotations
    compile.exclude group: 'org.jetbrains', module: 'annotations'

}
}

 dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'androidx.appcompat:appcompat:1.0.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.1.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'

//
//implementation 'androidx:multidex:2.0.1'

//
implementation(project(":Jumble")) 


implementation 'org.jsoup:jsoup:1.7.2'
implementation 'info.guardianproject.netcipher:netcipher:1.2'

//
implementation 'com.google.firebase:firebase-core:17.0.0'
implementation 'com.google.firebase:firebase-auth:18.0.0'
implementation 'com.google.firebase:firebase-database:18.0.0'
//implementation 'com.google.firebase:firebase-firestore:18.0.0'

}
apply plugin: 'com.google.gms.google-services'
buildscript {
ext.kotlin_version = '1.3.21'

repositories {
    mavenCentral()
    google()
    jcenter()
    maven {
        url 'https://maven.fabric.io/public'
    }

}
dependencies {
    classpath 'com.android.tools.build:gradle:3.4.1'
    classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    classpath 'com.google.gms:google-services:4.2.0'
    classpath 'io.fabric.tools:gradle:1.29.0'

    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
}
}

allprojects {
repositories {
    mavenCentral()
    google()
    jcenter()

}
}

task clean(type: Delete) {
delete rootProject.buildDir
}
混杂模块渐变依赖项

dependencies {

implementation 'com.google.protobuf:protobuf-java:3.0.0'
api 'com.madgag.spongycastle:core:1.51.0.0'

// Custom PKCS12 keybag parse modifications to support Mumble unencrypted certificates
// Source: https://github.com/Morlunk/spongycastle/tree/pkcs12-keybag-fixes
api files('libs/sc-morlunk-prov-1.51.0.0.jar', 'libs/sc-morlunk-pkix-1.51.0.0.jar')

implementation 'com.googlecode.javacpp:javacpp:0.7'
api 'com.intellij:annotations:+@jar'
}
  implementation 'com.google.crypto.tink:tink-android:1.4.0-rc2'
应用程序渐变文件

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'io.fabric'

android {
compileSdkVersion 28
defaultConfig {
    applicationId "com.app.demo"
    minSdkVersion 21
    targetSdkVersion 28
    multiDexEnabled true
    versionCode 1
    versionName "1.0"
    testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

    kapt {
        arguments {
            arg("room.schemaLocation", "$projectDir/schemas".toString())
        }
    }

}


lintOptions {
    abortOnError false
}

buildTypes {
    release {
        shrinkResources false
        minifyEnabled false
        signingConfig signingConfigs.publicVerReleaseSigningKey
        proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
    }
}

configurations {
    cleanedAnnotations
    compile.exclude group: 'org.jetbrains', module: 'annotations'

}
}

 dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'androidx.appcompat:appcompat:1.0.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.1.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'

//
//implementation 'androidx:multidex:2.0.1'

//
implementation(project(":Jumble")) 


implementation 'org.jsoup:jsoup:1.7.2'
implementation 'info.guardianproject.netcipher:netcipher:1.2'

//
implementation 'com.google.firebase:firebase-core:17.0.0'
implementation 'com.google.firebase:firebase-auth:18.0.0'
implementation 'com.google.firebase:firebase-database:18.0.0'
//implementation 'com.google.firebase:firebase-firestore:18.0.0'

}
apply plugin: 'com.google.gms.google-services'
buildscript {
ext.kotlin_version = '1.3.21'

repositories {
    mavenCentral()
    google()
    jcenter()
    maven {
        url 'https://maven.fabric.io/public'
    }

}
dependencies {
    classpath 'com.android.tools.build:gradle:3.4.1'
    classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    classpath 'com.google.gms:google-services:4.2.0'
    classpath 'io.fabric.tools:gradle:1.29.0'

    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
}
}

allprojects {
repositories {
    mavenCentral()
    google()
    jcenter()

}
}

task clean(type: Delete) {
delete rootProject.buildDir
}

尝试将其添加到您的依赖项中

dependencies {

implementation 'com.google.protobuf:protobuf-java:3.0.0'
api 'com.madgag.spongycastle:core:1.51.0.0'

// Custom PKCS12 keybag parse modifications to support Mumble unencrypted certificates
// Source: https://github.com/Morlunk/spongycastle/tree/pkcs12-keybag-fixes
api files('libs/sc-morlunk-prov-1.51.0.0.jar', 'libs/sc-morlunk-pkix-1.51.0.0.jar')

implementation 'com.googlecode.javacpp:javacpp:0.7'
api 'com.intellij:annotations:+@jar'
}
  implementation 'com.google.crypto.tink:tink-android:1.4.0-rc2'

尝试将其添加到您的依赖项中

dependencies {

implementation 'com.google.protobuf:protobuf-java:3.0.0'
api 'com.madgag.spongycastle:core:1.51.0.0'

// Custom PKCS12 keybag parse modifications to support Mumble unencrypted certificates
// Source: https://github.com/Morlunk/spongycastle/tree/pkcs12-keybag-fixes
api files('libs/sc-morlunk-prov-1.51.0.0.jar', 'libs/sc-morlunk-pkix-1.51.0.0.jar')

implementation 'com.googlecode.javacpp:javacpp:0.7'
api 'com.intellij:annotations:+@jar'
}
  implementation 'com.google.crypto.tink:tink-android:1.4.0-rc2'

您是否尝试删除.gradle和应用程序/构建文件夹,并创建一个gradle clean+gradle build?是的,我尝试了此操作,但没有成功。您是否尝试删除.gradle和应用程序/构建文件夹,并创建一个gradle clean+gradle build?是的,我尝试了此操作,但没有成功