androidx.security依赖问题

问题描述 投票:0回答:1

我需要加密SharedPreferences,所以我决定尝试使用:

implementation 'androidx.security:security-crypto:1.0.0-rc01'

它至少需要Sdk 23,所以我更改了应用程序使其兼容。

现在我得到了一堆红线,如下所示:

Duplicate class com.google.protobuf.Timestamp$1 found in modules jetified-protobuf-javalite-3.11.1.jar (com.google.protobuf:protobuf-javalite:3.11.1) and jetified-protolite-well-known-types-17.0.0-runtime.jar (com.google.firebase:protolite-well-known-types:17.0.0)
Duplicate class com.google.protobuf.Timestamp$Builder found in modules jetified-protobuf-javalite-3.11.1.jar (com.google.protobuf:protobuf-javalite:3.11.1) and jetified-protolite-well-known-types-17.0.0-runtime.jar (com.google.firebase:protolite-well-known-types:17.0.0)
Duplicate class com.google.protobuf.TimestampOrBuilder found in modules jetified-protobuf-javalite-3.11.1.jar (com.google.protobuf:protobuf-javalite:3.11.1) and jetified-protolite-well-known-types-17.0.0-runtime.jar (com.google.firebase:protolite-well-known-types:17.0.0)
Duplicate class com.google.protobuf.TimestampProto found in modules jetified-protobuf-javalite-3.11.1.jar (com.google.protobuf:protobuf-javalite:3.11.1) and jetified-protolite-well-known-types-17.0.0-runtime.jar (com.google.firebase:protolite-well-known-types:17.0.0)
Duplicate class com.google.protobuf.Type found in modules jetified-protobuf-javalite-3.11.1.jar (com.google.protobuf:protobuf-javalite:3.11.1) and jetified-protolite-well-known-types-17.0.0-runtime.jar (com.google.firebase:protolite-well-known-types:17.0.0)
Duplicate class com.google.protobuf.Type$1 found in modules jetified-protobuf-javalite-3.11.1.jar (com.google.protobuf:protobuf-javalite:3.11.1) and jetified-protolite-well-known-types-17.0.0-runtime.jar (com.google.firebase:protolite-well-known-types:17.0.0)
Duplicate class com.google.protobuf.Type$Builder found in modules jetified-protobuf-javalite-3.11.1.jar (com.google.protobuf:protobuf-javalite:3.11.1) and jetified-protolite-well-known-types-17.0.0-runtime.jar (com.google.firebase:protolite-well-known-types:17.0.0)
Duplicate class com.google.protobuf.TypeOrBuilder found in modules jetified-protobuf-javalite-3.11.1.jar (com.google.protobuf:protobuf-javalite:3.11.1) and jetified-protolite-well-known-types-17.0.0-runtime.jar (com.google.firebase:protolite-well-known-types:17.0.0)
Duplicate class com.google.protobuf.TypeProto found in modules jetified-protobuf-javalite-3.11.1.jar (com.google.protobuf:protobuf-javalite:3.11.1) and jetified-protolite-well-known-types-17.0.0-runtime.jar (com.google.firebase:protolite-well-known-types:17.0.0)
Duplicate class com.google.protobuf.UInt32Value found in modules jetified-protobuf-javalite-3.11.1.jar (com.google.protobuf:protobuf-javalite:3.11.1) and jetified-protolite-well-known-types-17.0.0-runtime.jar (com.google.firebase:protolite-well-known-types:17.0.0)
Duplicate class com.google.protobuf.UInt32Value$1 found in modules jetified-protobuf-javalite-3.11.1.jar (com.google.protobuf:protobuf-javalite:3.11.1) and jetified-protolite-well-known-types-17.0.0-runtime.jar (com.google.firebase:protolite-well-known-types:17.0.0)
Duplicate class com.google.protobuf.UInt32Value$Builder found in modules jetified-protobuf-javalite-3.11.1.jar (com.google.protobuf:protobuf-javalite:3.11.1) and jetified-protolite-well-known-types-17.0.0-runtime.jar (com.google.firebase:protolite-well-known-types:17.0.0)
Duplicate class com.google.protobuf.UInt32ValueOrBuilder found in modules jetified-protobuf-javalite-3.11.1.jar (com.google.protobuf:protobuf-javalite:3.11.1) and jetified-protolite-well-known-types-17.0.0-runtime.jar (com.google.firebase:protolite-well-known-types:17.0.0)
Duplicate class com.google.protobuf.UInt64Value found in modules jetified-protobuf-javalite-3.11.1.jar (com.google.protobuf:protobuf-javalite:3.11.1) and jetified-protolite-well-known-types-17.0.0-runtime.jar (com.google.firebase:protolite-well-known-types:17.0.0)
Duplicate class com.google.protobuf.UInt64Value$1 found in modules jetified-protobuf-javalite-3.11.1.jar (com.google.protobuf:protobuf-javalite:3.11.1) and jetified-protolite-well-known-types-17.0.0-runtime.jar (com.google.firebase:protolite-well-known-types:17.0.0)
Duplicate class com.google.protobuf.UInt64Value$Builder found in modules jetified-protobuf-javalite-3.11.1.jar (com.google.protobuf:protobuf-javalite:3.11.1) and jetified-protolite-well-known-types-17.0.0-runtime.jar (com.google.firebase:protolite-well-known-types:17.0.0)
Duplicate class com.google.protobuf.UInt64ValueOrBuilder found in modules jetified-protobuf-javalite-3.11.1.jar (com.google.protobuf:protobuf-javalite:3.11.1) and jetified-protolite-well-known-types-17.0.0-runtime.jar (com.google.firebase:protolite-well-known-types:17.0.0)
Duplicate class com.google.protobuf.UninitializedMessageException found in modules jetified-protobuf-javalite-3.11.1.jar (com.google.protobuf:protobuf-javalite:3.11.1) and jetified-protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-lite:3.0.1)
Duplicate class com.google.protobuf.UnknownFieldSetLite found in modules jetified-protobuf-javalite-3.11.1.jar (com.google.protobuf:protobuf-javalite:3.11.1) and jetified-protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-lite:3.0.1)
Duplicate class com.google.protobuf.UnmodifiableLazyStringList found in modules jetified-protobuf-javalite-3.11.1.jar (com.google.protobuf:protobuf-javalite:3.11.1) and jetified-protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-lite:3.0.1)
Duplicate class com.google.protobuf.UnmodifiableLazyStringList$1 found in modules jetified-protobuf-javalite-3.11.1.jar (com.google.protobuf:protobuf-javalite:3.11.1) and jetified-protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-lite:3.0.1)
Duplicate class com.google.protobuf.UnmodifiableLazyStringList$2 found in modules jetified-protobuf-javalite-3.11.1.jar (com.google.protobuf:protobuf-javalite:3.11.1) and jetified-protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-lite:3.0.1)
Duplicate class com.google.protobuf.UnsafeUtil found in modules jetified-protobuf-javalite-3.11.1.jar (com.google.protobuf:protobuf-javalite:3.11.1) and jetified-protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-lite:3.0.1)
Duplicate class com.google.protobuf.UnsafeUtil$1 found in modules jetified-protobuf-javalite-3.11.1.jar (com.google.protobuf:protobuf-javalite:3.11.1) and jetified-protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-lite:3.0.1)
Duplicate class com.google.protobuf.Utf8 found in modules jetified-protobuf-javalite-3.11.1.jar (com.google.protobuf:protobuf-javalite:3.11.1) and jetified-protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-lite:3.0.1)
Duplicate class com.google.protobuf.Utf8$Processor found in modules jetified-protobuf-javalite-3.11.1.jar (com.google.protobuf:protobuf-javalite:3.11.1) and jetified-protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-lite:3.0.1)
Duplicate class com.google.protobuf.Utf8$SafeProcessor found in modules jetified-protobuf-javalite-3.11.1.jar (com.google.protobuf:protobuf-javalite:3.11.1) and jetified-protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-lite:3.0.1)
Duplicate class com.google.protobuf.Utf8$UnpairedSurrogateException found in modules jetified-protobuf-javalite-3.11.1.jar (com.google.protobuf:protobuf-javalite:3.11.1) and jetified-protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-lite:3.0.1)
Duplicate class com.google.protobuf.Utf8$UnsafeProcessor found in modules jetified-protobuf-javalite-3.11.1.jar (com.google.protobuf:protobuf-javalite:3.11.1) and jetified-protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-lite:3.0.1)
Duplicate class com.google.protobuf.Value found in modules jetified-protobuf-javalite-3.11.1.jar (com.google.protobuf:protobuf-javalite:3.11.1) and jetified-protolite-well-known-types-17.0.0-runtime.jar (com.google.firebase:protolite-well-known-types:17.0.0)
Duplicate class com.google.protobuf.Value$1 found in modules jetified-protobuf-javalite-3.11.1.jar (com.google.protobuf:protobuf-javalite:3.11.1) and jetified-protolite-well-known-types-17.0.0-runtime.jar (com.google.firebase:protolite-well-known-types:17.0.0)
Duplicate class com.google.protobuf.Value$Builder found in modules jetified-protobuf-javalite-3.11.1.jar (com.google.protobuf:protobuf-javalite:3.11.1) and jetified-protolite-well-known-types-17.0.0-runtime.jar (com.google.firebase:protolite-well-known-types:17.0.0)
Duplicate class com.google.protobuf.Value$KindCase found in modules jetified-protobuf-javalite-3.11.1.jar (com.google.protobuf:protobuf-javalite:3.11.1) and jetified-protolite-well-known-types-17.0.0-runtime.jar (com.google.firebase:protolite-well-known-types:17.0.0)
Duplicate class com.google.protobuf.ValueOrBuilder found in modules jetified-protobuf-javalite-3.11.1.jar (com.google.protobuf:protobuf-javalite:3.11.1) and jetified-protolite-well-known-types-17.0.0-runtime.jar (com.google.firebase:protolite-well-known-types:17.0.0)
Duplicate class com.google.protobuf.WireFormat found in modules jetified-protobuf-javalite-3.11.1.jar (com.google.protobuf:protobuf-javalite:3.11.1) and jetified-protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-lite:3.0.1)
Duplicate class com.google.protobuf.WireFormat$1 found in modules jetified-protobuf-javalite-3.11.1.jar (com.google.protobuf:protobuf-javalite:3.11.1) and jetified-protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-lite:3.0.1)
Duplicate class com.google.protobuf.WireFormat$FieldType found in modules jetified-protobuf-javalite-3.11.1.jar (com.google.protobuf:protobuf-javalite:3.11.1) and jetified-protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-lite:3.0.1)
Duplicate class com.google.protobuf.WireFormat$FieldType$1 found in modules jetified-protobuf-javalite-3.11.1.jar (com.google.protobuf:protobuf-javalite:3.11.1) and jetified-protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-lite:3.0.1)
Duplicate class com.google.protobuf.WireFormat$FieldType$2 found in modules jetified-protobuf-javalite-3.11.1.jar (com.google.protobuf:protobuf-javalite:3.11.1) and jetified-protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-lite:3.0.1)
Duplicate class com.google.protobuf.WireFormat$FieldType$3 found in modules jetified-protobuf-javalite-3.11.1.jar (com.google.protobuf:protobuf-javalite:3.11.1) and jetified-protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-lite:3.0.1)
Duplicate class com.google.protobuf.WireFormat$FieldType$4 found in modules jetified-protobuf-javalite-3.11.1.jar (com.google.protobuf:protobuf-javalite:3.11.1) and jetified-protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-lite:3.0.1)
Duplicate class com.google.protobuf.WireFormat$JavaType found in modules jetified-protobuf-javalite-3.11.1.jar (com.google.protobuf:protobuf-javalite:3.11.1) and jetified-protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-lite:3.0.1)
Duplicate class com.google.protobuf.WireFormat$Utf8Validation found in modules jetified-protobuf-javalite-3.11.1.jar (com.google.protobuf:protobuf-javalite:3.11.1) and jetified-protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-lite:3.0.1)
Duplicate class com.google.protobuf.WireFormat$Utf8Validation$1 found in modules jetified-protobuf-javalite-3.11.1.jar (com.google.protobuf:protobuf-javalite:3.11.1) and jetified-protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-lite:3.0.1)
Duplicate class com.google.protobuf.WireFormat$Utf8Validation$2 found in modules jetified-protobuf-javalite-3.11.1.jar (com.google.protobuf:protobuf-javalite:3.11.1) and jetified-protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-lite:3.0.1)
Duplicate class com.google.protobuf.WireFormat$Utf8Validation$3 found in modules jetified-protobuf-javalite-3.11.1.jar (com.google.protobuf:protobuf-javalite:3.11.1) and jetified-protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-lite:3.0.1)
Duplicate class com.google.protobuf.WrappersProto found in modules jetified-protobuf-javalite-3.11.1.jar (com.google.protobuf:protobuf-javalite:3.11.1) and jetified-protolite-well-known-types-17.0.0-runtime.jar (com.google.firebase:protolite-well-known-types:17.0.0)

Go to the documentation to learn how to Fix dependency resolution errors.

如何解决此问题?

谢谢

java android androidx android-jetpack
1个回答
0
投票

重复类com.google.protobuf

© www.soinside.com 2019 - 2024. All rights reserved.