gpt4 book ai didi

java - 添加 2 个或更多 .jar 文件时出错。在模块 (Android) 中发现重复的类。有没有办法合并或排除重复的类?

转载 作者:行者123 更新时间:2023-12-01 17:49:30 24 4
gpt4 key购买 nike

我正在做一个 Android 应用程序,我正在尝试使用多个扩展通过 jar 文件添加它们。但是当我编译并运行时,出现以下错误:

Duplicate class com.google.gson.DefaultDateTypeAdapter found in modules jetified-siddhi-gpl-execution-geo-4.0.18.jar (siddhi-gpl-execution-geo-4.0.18.jar) and jetified-siddhi-map-json-4.1.2.jar (org.wso2.extension.siddhi.map.json:siddhi-map-json:4.1.2)
Duplicate class com.google.gson.ExclusionStrategy found in modules jetified-siddhi-gpl-execution-geo-4.0.18.jar (siddhi-gpl-execution-geo-4.0.18.jar) and jetified-siddhi-map-json-4.1.2.jar (org.wso2.extension.siddhi.map.json:siddhi-map-json:4.1.2)
Duplicate class com.google.gson.FieldAttributes found in modules jetified-siddhi-gpl-execution-geo-4.0.18.jar (siddhi-gpl-execution-geo-4.0.18.jar) and jetified-siddhi-map-json-4.1.2.jar (org.wso2.extension.siddhi.map.json:siddhi-map-json:4.1.2)
Duplicate class com.google.gson.FieldNamingPolicy found in modules jetified-siddhi-gpl-execution-geo-4.0.18.jar (siddhi-gpl-execution-geo-4.0.18.jar) and jetified-siddhi-map-json-4.1.2.jar (org.wso2.extension.siddhi.map.json:siddhi-map-json:4.1.2)
Duplicate class com.google.gson.FieldNamingPolicy$1 found in modules jetified-siddhi-gpl-execution-geo-4.0.18.jar (siddhi-gpl-execution-geo-4.0.18.jar) and jetified-siddhi-map-json-4.1.2.jar (org.wso2.extension.siddhi.map.json:siddhi-map-json:4.1.2)
Duplicate class com.google.gson.FieldNamingPolicy$2 found in modules jetified-siddhi-gpl-execution-geo-4.0.18.jar (siddhi-gpl-execution-geo-4.0.18.jar) and jetified-siddhi-map-json-4.1.2.jar (org.wso2.extension.siddhi.map.json:siddhi-map-json:4.1.2)
Duplicate class com.google.gson.FieldNamingPolicy$3 found in modules jetified-siddhi-gpl-execution-geo-4.0.18.jar (siddhi-gpl-execution-geo-4.0.18.jar) and jetified-siddhi-map-json-4.1.2.jar (org.wso2.extension.siddhi.map.json:siddhi-map-json:4.1.2)
Duplicate class com.google.gson.FieldNamingPolicy$4 found in modules jetified-siddhi-gpl-execution-geo-4.0.18.jar (siddhi-gpl-execution-geo-4.0.18.jar) and jetified-siddhi-map-json-4.1.2.jar (org.wso2.extension.siddhi.map.json:siddhi-map-json:4.1.2)
Duplicate class com.google.gson.FieldNamingPolicy$5 found in modules jetified-siddhi-gpl-execution-geo-4.0.18.jar (siddhi-gpl-execution-geo-4.0.18.jar) and jetified-siddhi-map-json-4.1.2.jar (org.wso2.extension.siddhi.map.json:siddhi-map-json:4.1.2)
Duplicate class com.google.gson.FieldNamingStrategy found in modules jetified-siddhi-gpl-execution-geo-4.0.18.jar (siddhi-gpl-execution-geo-4.0.18.jar) and jetified-siddhi-map-json-4.1.2.jar (org.wso2.extension.siddhi.map.json:siddhi-map-json:4.1.2)
Duplicate class com.google.gson.Gson found in modules jetified-siddhi-gpl-execution-geo-4.0.18.jar (siddhi-gpl-execution-geo-4.0.18.jar) and jetified-siddhi-map-json-4.1.2.jar (org.wso2.extension.siddhi.map.json:siddhi-map-json:4.1.2)
Duplicate class com.google.gson.Gson$1 found in modules jetified-siddhi-gpl-execution-geo-4.0.18.jar (siddhi-gpl-execution-geo-4.0.18.jar) and jetified-siddhi-map-json-4.1.2.jar (org.wso2.extension.siddhi.map.json:siddhi-map-json:4.1.2)
Duplicate class com.google.gson.Gson$2 found in modules jetified-siddhi-gpl-execution-geo-4.0.18.jar (siddhi-gpl-execution-geo-4.0.18.jar) and jetified-siddhi-map-json-4.1.2.jar (org.wso2.extension.siddhi.map.json:siddhi-map-json:4.1.2)
Duplicate class com.google.gson.Gson$3 found in modules jetified-siddhi-gpl-execution-geo-4.0.18.jar (siddhi-gpl-execution-geo-4.0.18.jar) and jetified-siddhi-map-json-4.1.2.jar (org.wso2.extension.siddhi.map.json:siddhi-map-json:4.1.2)
Duplicate class com.google.gson.Gson$4 found in modules jetified-siddhi-gpl-execution-geo-4.0.18.jar (siddhi-gpl-execution-geo-4.0.18.jar) and jetified-siddhi-map-json-4.1.2.jar (org.wso2.extension.siddhi.map.json:siddhi-map-json:4.1.2)
Duplicate class com.google.gson.Gson$5 found in modules jetified-siddhi-gpl-execution-geo-4.0.18.jar (siddhi-gpl-execution-geo-4.0.18.jar) and jetified-siddhi-map-json-4.1.2.jar (org.wso2.extension.siddhi.map.json:siddhi-map-json:4.1.2)
Duplicate class com.google.gson.Gson$FutureTypeAdapter found in modules jetified-siddhi-gpl-execution-geo-4.0.18.jar (siddhi-gpl-execution-geo-4.0.18.jar) and jetified-siddhi-map-json-4.1.2.jar (org.wso2.extension.siddhi.map.json:siddhi-map-json:4.1.2)
Duplicate class com.google.gson.GsonBuilder found in modules jetified-siddhi-gpl-execution-geo-4.0.18.jar (siddhi-gpl-execution-geo-4.0.18.jar) and jetified-siddhi-map-json-4.1.2.jar (org.wso2.extension.siddhi.map.json:siddhi-map-json:4.1.2)
Duplicate class com.google.gson.InstanceCreator found in modules jetified-siddhi-gpl-execution-geo-4.0.18.jar (siddhi-gpl-execution-geo-4.0.18.jar) and jetified-siddhi-map-json-4.1.2.jar (org.wso2.extension.siddhi.map.json:siddhi-map-json:4.1.2)
Duplicate class com.google.gson.JsonArray found in modules jetified-siddhi-gpl-execution-geo-4.0.18.jar (siddhi-gpl-execution-geo-4.0.18.jar) and jetified-siddhi-map-json-4.1.2.jar (org.wso2.extension.siddhi.map.json:siddhi-map-json:4.1.2)
Duplicate class com.google.gson.JsonDeserializationContext found in modules jetified-siddhi-gpl-execution-geo-4.0.18.jar (siddhi-gpl-execution-geo-4.0.18.jar) and jetified-siddhi-map-json-4.1.2.jar (org.wso2.extension.siddhi.map.json:siddhi-map-json:4.1.2)
Duplicate class com.google.gson.JsonDeserializer found in modules jetified-siddhi-gpl-execution-geo-4.0.18.jar (siddhi-gpl-execution-geo-4.0.18.jar) and jetified-siddhi-map-json-4.1.2.jar (org.wso2.extension.siddhi.map.json:siddhi-map-json:4.1.2)
Duplicate class com.google.gson.JsonElement found in modules jetified-siddhi-gpl-execution-geo-4.0.18.jar (siddhi-gpl-execution-geo-4.0.18.jar) and jetified-siddhi-map-json-4.1.2.jar (org.wso2.extension.siddhi.map.json:siddhi-map-json:4.1.2)
Duplicate class com.google.gson.JsonIOException found in modules jetified-siddhi-gpl-execution-geo-4.0.18.jar (siddhi-gpl-execution-geo-4.0.18.jar) and jetified-siddhi-map-json-4.1.2.jar (org.wso2.extension.siddhi.map.json:siddhi-map-json:4.1.2)
Duplicate class com.google.gson.JsonNull found in modules jetified-siddhi-gpl-execution-geo-4.0.18.jar (siddhi-gpl-execution-geo-4.0.18.jar) and jetified-siddhi-map-json-4.1.2.jar (org.wso2.extension.siddhi.map.json:siddhi-map-json:4.1.2)
Duplicate class com.google.gson.JsonObject found in modules jetified-siddhi-gpl-execution-geo-4.0.18.jar (siddhi-gpl-execution-geo-4.0.18.jar) and jetified-siddhi-map-json-4.1.2.jar (org.wso2.extension.siddhi.map.json:siddhi-map-json:4.1.2)
Duplicate class com.google.gson.JsonParseException found in modules jetified-siddhi-gpl-execution-geo-4.0.18.jar (siddhi-gpl-execution-geo-4.0.18.jar) and jetified-siddhi-map-json-4.1.2.jar (org.wso2.extension.siddhi.map.json:siddhi-map-json:4.1.2)
Duplicate class com.google.gson.JsonParser found in modules jetified-siddhi-gpl-execution-geo-4.0.18.jar (siddhi-gpl-execution-geo-4.0.18.jar) and jetified-siddhi-map-json-4.1.2.jar (org.wso2.extension.siddhi.map.json:siddhi-map-json:4.1.2)
Duplicate class com.google.gson.JsonPrimitive found in modules jetified-siddhi-gpl-execution-geo-4.0.18.jar (siddhi-gpl-execution-geo-4.0.18.jar) and jetified-siddhi-map-json-4.1.2.jar (org.wso2.extension.siddhi.map.json:siddhi-map-json:4.1.2)
Duplicate class com.google.gson.JsonSerializationContext found in modules jetified-siddhi-gpl-execution-geo-4.0.18.jar (siddhi-gpl-execution-geo-4.0.18.jar) and jetified-siddhi-map-json-4.1.2.jar (org.wso2.extension.siddhi.map.json:siddhi-map-json:4.1.2)
Duplicate class com.google.gson.JsonSerializer found in modules jetified-siddhi-gpl-execution-geo-4.0.18.jar (siddhi-gpl-execution-geo-4.0.18.jar) and jetified-siddhi-map-json-4.1.2.jar (org.wso2.extension.siddhi.map.json:siddhi-map-json:4.1.2)
Duplicate class com.google.gson.JsonStreamParser found in modules jetified-siddhi-gpl-execution-geo-4.0.18.jar (siddhi-gpl-execution-geo-4.0.18.jar) and jetified-siddhi-map-json-4.1.2.jar (org.wso2.extension.siddhi.map.json:siddhi-map-json:4.1.2)
Duplicate class com.google.gson.JsonSyntaxException found in modules jetified-siddhi-gpl-execution-geo-4.0.18.jar (siddhi-gpl-execution-geo-4.0.18.jar) and jetified-siddhi-map-json-4.1.2.jar (org.wso2.extension.siddhi.map.json:siddhi-map-json:4.1.2)
Duplicate class com.google.gson.LongSerializationPolicy found in modules jetified-siddhi-gpl-execution-geo-4.0.18.jar (siddhi-gpl-execution-geo-4.0.18.jar) and jetified-siddhi-map-json-4.1.2.jar (org.wso2.extension.siddhi.map.json:siddhi-map-json:4.1.2)
Duplicate class com.google.gson.LongSerializationPolicy$1 found in modules jetified-siddhi-gpl-execution-geo-4.0.18.jar (siddhi-gpl-execution-geo-4.0.18.jar) and jetified-siddhi-map-json-4.1.2.jar (org.wso2.extension.siddhi.map.json:siddhi-map-json:4.1.2)
Duplicate class com.google.gson.LongSerializationPolicy$2 found in modules jetified-siddhi-gpl-execution-geo-4.0.18.jar (siddhi-gpl-execution-geo-4.0.18.jar) and jetified-siddhi-map-json-4.1.2.jar (org.wso2.extension.siddhi.map.json:siddhi-map-json:4.1.2)
Duplicate class com.google.gson.TypeAdapter found in modules jetified-siddhi-gpl-execution-geo-4.0.18.jar (siddhi-gpl-execution-geo-4.0.18.jar) and jetified-siddhi-map-json-4.1.2.jar (org.wso2.extension.siddhi.map.json:siddhi-map-json:4.1.2)
Duplicate class com.google.gson.TypeAdapter$1 found in modules jetified-siddhi-gpl-execution-geo-4.0.18.jar (siddhi-gpl-execution-geo-4.0.18.jar) and jetified-siddhi-map-json-4.1.2.jar (org.wso2.extension.siddhi.map.json:siddhi-map-json:4.1.2)
Duplicate class com.google.gson.TypeAdapterFactory found in modules jetified-siddhi-gpl-execution-geo-4.0.18.jar (siddhi-gpl-execution-geo-4.0.18.jar) and jetified-siddhi-map-json-4.1.2.jar (org.wso2.extension.siddhi.map.json:siddhi-map-json:4.1.2)
Duplicate class com.google.gson.annotations.Expose found in modules jetified-siddhi-gpl-execution-geo-4.0.18.jar (siddhi-gpl-execution-geo-4.0.18.jar) and jetified-siddhi-map-json-4.1.2.jar (org.wso2.extension.siddhi.map.json:siddhi-map-json:4.1.2)
Duplicate class com.google.gson.annotations.SerializedName found in modules jetified-siddhi-gpl-execution-geo-4.0.18.jar (siddhi-gpl-execution-geo-4.0.18.jar) and jetified-siddhi-map-json-4.1.2.jar (org.wso2.extension.siddhi.map.json:siddhi-map-json:4.1.2)
Duplicate class com.google.gson.annotations.Since found in modules jetified-siddhi-gpl-execution-geo-4.0.18.jar (siddhi-gpl-execution-geo-4.0.18.jar) and jetified-siddhi-map-json-4.1.2.jar (org.wso2.extension.siddhi.map.json:siddhi-map-json:4.1.2)
Duplicate class com.google.gson.annotations.Until found in modules jetified-siddhi-gpl-execution-geo-4.0.18.jar (siddhi-gpl-execution-geo-4.0.18.jar) and jetified-siddhi-map-json-4.1.2.jar (org.wso2.extension.siddhi.map.json:siddhi-map-json:4.1.2)
Duplicate class com.google.gson.internal.$Gson$Preconditions found in modules jetified-siddhi-gpl-execution-geo-4.0.18.jar (siddhi-gpl-execution-geo-4.0.18.jar) and jetified-siddhi-map-json-4.1.2.jar (org.wso2.extension.siddhi.map.json:siddhi-map-json:4.1.2)
Duplicate class com.google.gson.internal.$Gson$Types found in modules jetified-siddhi-gpl-execution-geo-4.0.18.jar (siddhi-gpl-execution-geo-4.0.18.jar) and jetified-siddhi-map-json-4.1.2.jar (org.wso2.extension.siddhi.map.json:siddhi-map-json:4.1.2)
Duplicate class com.google.gson.internal.$Gson$Types$GenericArrayTypeImpl found in modules jetified-siddhi-gpl-execution-geo-4.0.18.jar (siddhi-gpl-execution-geo-4.0.18.jar) and jetified-siddhi-map-json-4.1.2.jar (org.wso2.extension.siddhi.map.json:siddhi-map-json:4.1.2)
Duplicate class com.google.gson.internal.$Gson$Types$ParameterizedTypeImpl found in modules jetified-siddhi-gpl-execution-geo-4.0.18.jar (siddhi-gpl-execution-geo-4.0.18.jar) and jetified-siddhi-map-json-4.1.2.jar (org.wso2.extension.siddhi.map.json:siddhi-map-json:4.1.2)
Duplicate class com.google.gson.internal.$Gson$Types$WildcardTypeImpl found in modules jetified-siddhi-gpl-execution-geo-4.0.18.jar (siddhi-gpl-execution-geo-4.0.18.jar) and jetified-siddhi-map-json-4.1.2.jar (org.wso2.extension.siddhi.map.json:siddhi-map-json:4.1.2)
Duplicate class com.google.gson.internal.ConstructorConstructor found in modules jetified-siddhi-gpl-execution-geo-4.0.18.jar (siddhi-gpl-execution-geo-4.0.18.jar) and jetified-siddhi-map-json-4.1.2.jar (org.wso2.extension.siddhi.map.json:siddhi-map-json:4.1.2)
Duplicate class com.google.gson.internal.ConstructorConstructor$1 found in modules jetified-siddhi-gpl-execution-geo-4.0.18.jar (siddhi-gpl-execution-geo-4.0.18.jar) and jetified-siddhi-map-json-4.1.2.jar (org.wso2.extension.siddhi.map.json:siddhi-map-json:4.1.2)
Duplicate class com.google.gson.internal.ConstructorConstructor$10 found in modules jetified-siddhi-gpl-execution-geo-4.0.18.jar (siddhi-gpl-execution-geo-4.0.18.jar) and jetified-siddhi-map-json-4.1.2.jar (org.wso2.extension.siddhi.map.json:siddhi-map-json:4.1.2)
Duplicate class com.google.gson.internal.ConstructorConstructor$11 found in modules jetified-siddhi-gpl-execution-geo-4.0.18.jar (siddhi-gpl-execution-geo-4.0.18.jar) and jetified-siddhi-map-json-4.1.2.jar (org.wso2.extension.siddhi.map.json:siddhi-map-json:4.1.2)
Duplicate class com.google.gson.internal.ConstructorConstructor$12 found in modules jetified-siddhi-gpl-execution-geo-4.0.18.jar (siddhi-gpl-execution-geo-4.0.18.jar) and jetified-siddhi-map-json-4.1.2.jar (org.wso2.extension.siddhi.map.json:siddhi-map-json:4.1.2)
Duplicate class com.google.gson.internal.ConstructorConstructor$2 found in modules jetified-siddhi-gpl-execution-geo-4.0.18.jar (siddhi-gpl-execution-geo-4.0.18.jar) and jetified-siddhi-map-json-4.1.2.jar (org.wso2.extension.siddhi.map.json:siddhi-map-json:4.1.2)
Duplicate class com.google.gson.internal.ConstructorConstructor$3 found in modules jetified-siddhi-gpl-execution-geo-4.0.18.jar (siddhi-gpl-execution-geo-4.0.18.jar) and jetified-siddhi-map-json-4.1.2.jar (org.wso2.extension.siddhi.map.json:siddhi-map-json:4.1.2)
Duplicate class com.google.gson.internal.ConstructorConstructor$4 found in modules jetified-siddhi-gpl-execution-geo-4.0.18.jar (siddhi-gpl-execution-geo-4.0.18.jar) and jetified-siddhi-map-json-4.1.2.jar (org.wso2.extension.siddhi.map.json:siddhi-map-json:4.1.2)
Duplicate class com.google.gson.internal.ConstructorConstructor$5 found in modules jetified-siddhi-gpl-execution-geo-4.0.18.jar (siddhi-gpl-execution-geo-4.0.18.jar) and jetified-siddhi-map-json-4.1.2.jar (org.wso2.extension.siddhi.map.json:siddhi-map-json:4.1.2)
Duplicate class com.google.gson.internal.ConstructorConstructor$6 found in modules jetified-siddhi-gpl-execution-geo-4.0.18.jar (siddhi-gpl-execution-geo-4.0.18.jar) and jetified-siddhi-map-json-4.1.2.jar (org.wso2.extension.siddhi.map.json:siddhi-map-json:4.1.2)
Duplicate class com.google.gson.internal.ConstructorConstructor$7 found in modules jetified-siddhi-gpl-execution-geo-4.0.18.jar (siddhi-gpl-execution-geo-4.0.18.jar) and jetified-siddhi-map-json-4.1.2.jar (org.wso2.extension.siddhi.map.json:siddhi-map-json:4.1.2)
Duplicate class com.google.gson.internal.ConstructorConstructor$8 found in modules jetified-siddhi-gpl-execution-geo-4.0.18.jar (siddhi-gpl-execution-geo-4.0.18.jar) and jetified-siddhi-map-json-4.1.2.jar (org.wso2.extension.siddhi.map.json:siddhi-map-json:4.1.2)
Duplicate class com.google.gson.internal.ConstructorConstructor$9 found in modules jetified-siddhi-gpl-execution-geo-4.0.18.jar (siddhi-gpl-execution-geo-4.0.18.jar) and jetified-siddhi-map-json-4.1.2.jar (org.wso2.extension.siddhi.map.json:siddhi-map-json:4.1.2)
Duplicate class com.google.gson.internal.Excluder found in modules jetified-siddhi-gpl-execution-geo-4.0.18.jar (siddhi-gpl-execution-geo-4.0.18.jar) and jetified-siddhi-map-json-4.1.2.jar (org.wso2.extension.siddhi.map.json:siddhi-map-json:4.1.2)
Duplicate class com.google.gson.internal.Excluder$1 found in modules jetified-siddhi-gpl-execution-geo-4.0.18.jar (siddhi-gpl-execution-geo-4.0.18.jar) and jetified-siddhi-map-json-4.1.2.jar (org.wso2.extension.siddhi.map.json:siddhi-map-json:4.1.2)
Duplicate class com.google.gson.internal.JsonReaderInternalAccess found in modules jetified-siddhi-gpl-execution-geo-4.0.18.jar (siddhi-gpl-execution-geo-4.0.18.jar) and jetified-siddhi-map-json-4.1.2.jar (org.wso2.extension.siddhi.map.json:siddhi-map-json:4.1.2)
Duplicate class com.google.gson.internal.LazilyParsedNumber found in modules jetified-siddhi-gpl-execution-geo-4.0.18.jar (siddhi-gpl-execution-geo-4.0.18.jar) and jetified-siddhi-map-json-4.1.2.jar (org.wso2.extension.siddhi.map.json:siddhi-map-json:4.1.2)
Duplicate class com.google.gson.internal.LinkedTreeMap found in modules jetified-siddhi-gpl-execution-geo-4.0.18.jar (siddhi-gpl-execution-geo-4.0.18.jar) and jetified-siddhi-map-json-4.1.2.jar (org.wso2.extension.siddhi.map.json:siddhi-map-json:4.1.2)
Duplicate class com.google.gson.internal.LinkedTreeMap$1 found in modules jetified-siddhi-gpl-execution-geo-4.0.18.jar (siddhi-gpl-execution-geo-4.0.18.jar) and jetified-siddhi-map-json-4.1.2.jar (org.wso2.extension.siddhi.map.json:siddhi-map-json:4.1.2)
Duplicate class com.google.gson.internal.LinkedTreeMap$EntrySet found in modules jetified-siddhi-gpl-execution-geo-4.0.18.jar (siddhi-gpl-execution-geo-4.0.18.jar) and jetified-siddhi-map-json-4.1.2.jar (org.wso2.extension.siddhi.map.json:siddhi-map-json:4.1.2)
Duplicate class com.google.gson.internal.LinkedTreeMap$EntrySet$1 found in modules jetified-siddhi-gpl-execution-geo-4.0.18.jar (siddhi-gpl-execution-geo-4.0.18.jar) and jetified-siddhi-map-json-4.1.2.jar (org.wso2.extension.siddhi.map.json:siddhi-map-json:4.1.2)
Duplicate class com.google.gson.internal.LinkedTreeMap$KeySet found in modules jetified-siddhi-gpl-execution-geo-4.0.18.jar (siddhi-gpl-execution-geo-4.0.18.jar) and jetified-siddhi-map-json-4.1.2.jar (org.wso2.extension.siddhi.map.json:siddhi-map-json:4.1.2)
Duplicate class com.google.gson.internal.LinkedTreeMap$KeySet$1 found in modules jetified-siddhi-gpl-execution-geo-4.0.18.jar (siddhi-gpl-execution-geo-4.0.18.jar) and jetified-siddhi-map-json-4.1.2.jar (org.wso2.extension.siddhi.map.json:siddhi-map-json:4.1.2)
Duplicate class com.google.gson.internal.LinkedTreeMap$LinkedTreeMapIterator found in modules jetified-siddhi-gpl-execution-geo-4.0.18.jar (siddhi-gpl-execution-geo-4.0.18.jar) and jetified-siddhi-map-json-4.1.2.jar (org.wso2.extension.siddhi.map.json:siddhi-map-json:4.1.2)
Duplicate class com.google.gson.internal.LinkedTreeMap$Node found in modules jetified-siddhi-gpl-execution-geo-4.0.18.jar (siddhi-gpl-execution-geo-4.0.18.jar) and jetified-siddhi-map-json-4.1.2.jar (org.wso2.extension.siddhi.map.json:siddhi-map-json:4.1.2)
Duplicate class com.google.gson.internal.ObjectConstructor found in modules jetified-siddhi-gpl-execution-geo-4.0.18.jar (siddhi-gpl-execution-geo-4.0.18.jar) and jetified-siddhi-map-json-4.1.2.jar (org.wso2.extension.siddhi.map.json:siddhi-map-json:4.1.2)
Duplicate class com.google.gson.internal.Primitives found in modules jetified-siddhi-gpl-execution-geo-4.0.18.jar (siddhi-gpl-execution-geo-4.0.18.jar) and jetified-siddhi-map-json-4.1.2.jar (org.wso2.extension.siddhi.map.json:siddhi-map-json:4.1.2)
Duplicate class com.google.gson.internal.Streams found in modules jetified-siddhi-gpl-execution-geo-4.0.18.jar (siddhi-gpl-execution-geo-4.0.18.jar) and jetified-siddhi-map-json-4.1.2.jar (org.wso2.extension.siddhi.map.json:siddhi-map-json:4.1.2)
Duplicate class com.google.gson.internal.Streams$AppendableWriter found in modules jetified-siddhi-gpl-execution-geo-4.0.18.jar (siddhi-gpl-execution-geo-4.0.18.jar) and jetified-siddhi-map-json-4.1.2.jar (org.wso2.extension.siddhi.map.json:siddhi-map-json:4.1.2)
Duplicate class com.google.gson.internal.Streams$AppendableWriter$CurrentWrite found in modules jetified-siddhi-gpl-execution-geo-4.0.18.jar (siddhi-gpl-execution-geo-4.0.18.jar) and jetified-siddhi-map-json-4.1.2.jar (org.wso2.extension.siddhi.map.json:siddhi-map-json:4.1.2)
Duplicate class com.google.gson.internal.UnsafeAllocator found in modules jetified-siddhi-gpl-execution-geo-4.0.18.jar (siddhi-gpl-execution-geo-4.0.18.jar) and jetified-siddhi-map-json-4.1.2.jar (org.wso2.extension.siddhi.map.json:siddhi-map-json:4.1.2)
Duplicate class com.google.gson.internal.UnsafeAllocator$1 found in modules jetified-siddhi-gpl-execution-geo-4.0.18.jar (siddhi-gpl-execution-geo-4.0.18.jar) and jetified-siddhi-map-json-4.1.2.jar (org.wso2.extension.siddhi.map.json:siddhi-map-json:4.1.2)
Duplicate class com.google.gson.internal.UnsafeAllocator$2 found in modules jetified-siddhi-gpl-execution-geo-4.0.18.jar (siddhi-gpl-execution-geo-4.0.18.jar) and jetified-siddhi-map-json-4.1.2.jar (org.wso2.extension.siddhi.map.json:siddhi-map-json:4.1.2)
Duplicate class com.google.gson.internal.UnsafeAllocator$3 found in modules jetified-siddhi-gpl-execution-geo-4.0.18.jar (siddhi-gpl-execution-geo-4.0.18.jar) and jetified-siddhi-map-json-4.1.2.jar (org.wso2.extension.siddhi.map.json:siddhi-map-json:4.1.2)
Duplicate class com.google.gson.internal.UnsafeAllocator$4 found in modules jetified-siddhi-gpl-execution-geo-4.0.18.jar (siddhi-gpl-execution-geo-4.0.18.jar) and jetified-siddhi-map-json-4.1.2.jar (org.wso2.extension.siddhi.map.json:siddhi-map-json:4.1.2)
Duplicate class com.google.gson.internal.bind.ArrayTypeAdapter found in modules jetified-siddhi-gpl-execution-geo-4.0.18.jar (siddhi-gpl-execution-geo-4.0.18.jar) and jetified-siddhi-map-json-4.1.2.jar (org.wso2.extension.siddhi.map.json:siddhi-map-json:4.1.2)
Duplicate class com.google.gson.internal.bind.ArrayTypeAdapter$1 found in modules jetified-siddhi-gpl-execution-geo-4.0.18.jar (siddhi-gpl-execution-geo-4.0.18.jar) and jetified-siddhi-map-json-4.1.2.jar (org.wso2.extension.siddhi.map.json:siddhi-map-json:4.1.2)
Duplicate class com.google.gson.internal.bind.CollectionTypeAdapterFactory found in modules jetified-siddhi-gpl-execution-geo-4.0.18.jar (siddhi-gpl-execution-geo-4.0.18.jar) and jetified-siddhi-map-json-4.1.2.jar (org.wso2.extension.siddhi.map.json:siddhi-map-json:4.1.2)
Duplicate class com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter found in modules jetified-siddhi-gpl-execution-geo-4.0.18.jar (siddhi-gpl-execution-geo-4.0.18.jar) and jetified-siddhi-map-json-4.1.2.jar (org.wso2.extension.siddhi.map.json:siddhi-map-json:4.1.2)
Duplicate class com.google.gson.internal.bind.DateTypeAdapter found in modules jetified-siddhi-gpl-execution-geo-4.0.18.jar (siddhi-gpl-execution-geo-4.0.18.jar) and jetified-siddhi-map-json-4.1.2.jar (org.wso2.extension.siddhi.map.json:siddhi-map-json:4.1.2)
Duplicate class com.google.gson.internal.bind.DateTypeAdapter$1 found in modules jetified-siddhi-gpl-execution-geo-4.0.18.jar (siddhi-gpl-execution-geo-4.0.18.jar) and jetified-siddhi-map-json-4.1.2.jar (org.wso2.extension.siddhi.map.json:siddhi-map-json:4.1.2)
Duplicate class com.google.gson.internal.bind.JsonTreeReader found in modules jetified-siddhi-gpl-execution-geo-4.0.18.jar (siddhi-gpl-execution-geo-4.0.18.jar) and jetified-siddhi-map-json-4.1.2.jar (org.wso2.extension.siddhi.map.json:siddhi-map-json:4.1.2)
Duplicate class com.google.gson.internal.bind.JsonTreeReader$1 found in modules jetified-siddhi-gpl-execution-geo-4.0.18.jar (siddhi-gpl-execution-geo-4.0.18.jar) and jetified-siddhi-map-json-4.1.2.jar (org.wso2.extension.siddhi.map.json:siddhi-map-json:4.1.2)
Duplicate class com.google.gson.internal.bind.JsonTreeWriter found in modules jetified-siddhi-gpl-execution-geo-4.0.18.jar (siddhi-gpl-execution-geo-4.0.18.jar) and jetified-siddhi-map-json-4.1.2.jar (org.wso2.extension.siddhi.map.json:siddhi-map-json:4.1.2)
Duplicate class com.google.gson.internal.bind.JsonTreeWriter$1 found in modules jetified-siddhi-gpl-execution-geo-4.0.18.jar (siddhi-gpl-execution-geo-4.0.18.jar) and jetified-siddhi-map-json-4.1.2.jar (org.wso2.extension.siddhi.map.json:siddhi-map-json:4.1.2)
Duplicate class com.google.gson.internal.bind.MapTypeAdapterFactory found in modules jetified-siddhi-gpl-execution-geo-4.0.18.jar (siddhi-gpl-execution-geo-4.0.18.jar) and jetified-siddhi-map-json-4.1.2.jar (org.wso2.extension.siddhi.map.json:siddhi-map-json:4.1.2)
Duplicate class com.google.gson.internal.bind.MapTypeAdapterFactory$Adapter found in modules jetified-siddhi-gpl-execution-geo-4.0.18.jar (siddhi-gpl-execution-geo-4.0.18.jar) and jetified-siddhi-map-json-4.1.2.jar (org.wso2.extension.siddhi.map.json:siddhi-map-json:4.1.2)
Duplicate class com.google.gson.internal.bind.ObjectTypeAdapter found in modules jetified-siddhi-gpl-execution-geo-4.0.18.jar (siddhi-gpl-execution-geo-4.0.18.jar) and jetified-siddhi-map-json-4.1.2.jar (org.wso2.extension.siddhi.map.json:siddhi-map-json:4.1.2)
Duplicate class com.google.gson.internal.bind.ObjectTypeAdapter$1 found in modules jetified-siddhi-gpl-execution-geo-4.0.18.jar (siddhi-gpl-execution-geo-4.0.18.jar) and jetified-siddhi-map-json-4.1.2.jar (org.wso2.extension.siddhi.map.json:siddhi-map-json:4.1.2)
Duplicate class com.google.gson.internal.bind.ObjectTypeAdapter$2 found in modules jetified-siddhi-gpl-execution-geo-4.0.18.jar (siddhi-gpl-execution-geo-4.0.18.jar) and jetified-siddhi-map-json-4.1.2.jar (org.wso2.extension.siddhi.map.json:siddhi-map-json:4.1.2)
Duplicate class com.google.gson.internal.bind.ReflectiveTypeAdapterFactory found in modules jetified-siddhi-gpl-execution-geo-4.0.18.jar (siddhi-gpl-execution-geo-4.0.18.jar) and jetified-siddhi-map-json-4.1.2.jar (org.wso2.extension.siddhi.map.json:siddhi-map-json:4.1.2)

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

这是我的 build.gradle(应用程序):

apply plugin: 'com.android.application'
apply plugin: 'me.champeau.gradle.antlr4'
android {
compileSdkVersion 29
buildToolsVersion "29.0.2"
defaultConfig {
applicationId "uca.es.geoprueba"
minSdkVersion 19
targetSdkVersion 29
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
multiDexEnabled true

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

configurations{
all{
exclude group: "org.wso2.extension.siddhi.map.json", module: "siddhi-map-json"
resolutionStrategy.force 'com.google.code.findbugs:jsr305:3.0.1'
}
}

compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}

packagingOptions{
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/DEPENDENCIES'
merge 'META-INF/annotations/org.wso2.siddhi.annotation.Extension'
merge 'META-INF/annotations/io.siddhi.annotation.Extension'
pickFirst 'META-INF/DEPENDENCIES'

}
}

antlr4 {
extraArgs = ['-package', 'org.wso2.siddhi.query.compiler']
output = project.file("src/main/java/org/wso2/siddhi/query/compiler")
}

dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
testImplementation 'junit:junit:4.13'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
implementation('org.wso2.siddhi:siddhi-core:4.5.11') {
transitive = false
}
implementation('org.wso2.siddhi:siddhi-query-api:4.5.11') {
transitive = false
}
implementation('org.wso2.siddhi:siddhi-query-compiler:4.5.11') {
transitive = false
}
implementation('org.wso2.siddhi:siddhi-annotations:4.5.11') {
transitive = false
}
annotationProcessor('org.wso2.siddhi:siddhi-annotations:4.5.11') {
transitive = false
}

implementation ('org.wso2.extension.siddhi.map.json:siddhi-map-json:4.1.2'){
transitive = false
}

implementation 'com.google.guava:guava:24.1-jre'
implementation('org.apache.log4j.wso2:log4j:1.2.17.wso2v1') {
transitive = false
}
implementation 'org.osgi:org.osgi.core:6.0.0'
implementation 'org.wso2.orbit.com.lmax:disruptor:3.4.2.wso2v1'
implementation 'org.antlr:antlr4-runtime:4.8'
implementation 'com.android.support:multidex:1.0.3'
implementation 'com.android.support:design:29.0.2'
implementation 'io.dropwizard.metrics:metrics-core:4.1.2'
implementation files('libs/siddhi-gpl-execution-geo-4.0.18.jar')

}

我已经尝试过这个解决方案: Why I'm Getting Duplicate Class When Running My Android Project

虽然没有出现同样的错误,但是执行的时候却报错。就好像您只考虑了其中一个 jar 文件。这是错误:

2020-03-13 11:52:33.879 12164-12164/uca.es.geoprueba E/AndroidRuntime: FATAL EXCEPTION: main
Process: uca.es.geoprueba, PID: 12164
java.lang.RuntimeException: Unable to start activity ComponentInfo{uca.es.geoprueba/uca.es.geoprueba.MainActivity}: org.wso2.siddhi.core.exception.SiddhiAppCreationException: Error on 'geofencingSiddhi' @ Line: 1. Position: 232, near '@source(type='inMemory', @map(type='json', enclosing.element='STRING', fail.on.missing.attribute='false')) define stream inStream(id string, latitud double, longitud double, geoJSONGeometryFence string)'. No extension exist for sourceMapper:json

有没有办法合并重复的类或排除其中一些?

最佳答案

我终于找到解决办法了。

我遵循了这个解决方案:

Duplicates class found in modules

关于java - 添加 2 个或更多 .jar 文件时出错。在模块 (Android) 中发现重复的类。有没有办法合并或排除重复的类?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60821121/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com