Error checkReleaseDuplicateClasses when build file with google admob and google native ad in Unity

21 Views Asked by At

Current using google admob v8.7.0

* What went wrong:
Execution failed for task ':launcher:checkReleaseDuplicateClasses'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable
   > Duplicate class com.google.gson.DefaultDateTypeAdapter found in modules jetified-com.google.code.gson.gson-2.8.5 (com.google.code.gson.gson-2.8.5.jar) and jetified-gson-2.8.5 (com.google.code.gson:gson:2.8.5)
     Duplicate class com.google.gson.ExclusionStrategy found in modules jetified-com.google.code.gson.gson-2.8.5 (com.google.code.gson.gson-2.8.5.jar) and jetified-gson-2.8.5 (com.google.code.gson:gson:2.8.5)
     Duplicate class com.google.gson.FieldAttributes found in modules jetified-com.google.code.gson.gson-2.8.5 (com.google.code.gson.gson-2.8.5.jar) and jetified-gson-2.8.5 (com.google.code.gson:gson:2.8.5)
     Duplicate class com.google.gson.FieldNamingPolicy found in modules jetified-com.google.code.gson.gson-2.8.5 (com.google.code.gson.gson-2.8.5.jar) and jetified-gson-2.8.5 (com.google.code.gson:gson:2.8.5)
     Duplicate class com.google.gson.FieldNamingPolicy$1 found in modules jetified-com.google.code.gson.gson-2.8.5 (com.google.code.gson.gson-2.8.5.jar) and jetified-gson-2.8.5 (com.google.code.gson:gson:2.8.5)
     Duplicate class com.google.gson.FieldNamingPolicy$2 found in modules jetified-com.google.code.gson.gson-2.8.5 (com.google.code.gson.gson-2.8.5.jar) and jetified-gson-2.8.5 (com.google.code.gson:gson:2.8.5)
     Duplicate class com.google.gson.FieldNamingPolicy$3 found in modules jetified-com.google.code.gson.gson-2.8.5 (com.google.code.gson.gson-2.8.5.jar) and jetified-gson-2.8.5 (com.google.code.gson:gson:2.8.5)
     Duplicate class com.google.gson.FieldNamingPolicy$4 found in modules jetified-com.google.code.gson.gson-2.8.5 (com.google.code.gson.gson-2.8.5.jar) and jetified-gson-2.8.5 (com.google.code.gson:gson:2.8.5)
     Duplicate class com.google.gson.FieldNamingPolicy$5 found in modules jetified-com.google.code.gson.gson-2.8.5 (com.google.code.gson.gson-2.8.5.jar) and jetified-gson-2.8.5 (com.google.code.gson:gson:2.8.5)
     Duplicate class com.google.gson.FieldNamingPolicy$6 found in modules jetified-com.google.code.gson.gson-2.8.5 (com.google.code.gson.gson-2.8.5.jar) and jetified-gson-2.8.5 (com.google.code.gson:gson:2.8.5)
     Duplicate class com.google.gson.FieldNamingStrategy found in modules jetified-com.google.code.gson.gson-2.8.5 (com.google.code.gson.gson-2.8.5.jar) and jetified-gson-2.8.5 (com.google.code.gson:gson:2.8.5)
     Duplicate class com.google.gson.Gson found in modules jetified-com.google.code.gson.gson-2.8.5 (com.google.code.gson.gson-2.8.5.jar) and jetified-gson-2.8.5 (com.google.code.gson:gson:2.8.5)
     Duplicate class com.google.gson.Gson$1 found in modules jetified-com.google.code.gson.gson-2.8.5 (com.google.code.gson.gson-2.8.5.jar) and jetified-gson-2.8.5 (com.google.code.gson:gson:2.8.5)
     Duplicate class com.google.gson.Gson$2 found in modules jetified-com.google.code.gson.gson-2.8.5 (com.google.code.gson.gson-2.8.5.jar) and jetified-gson-2.8.5 (com.google.code.gson:gson:2.8.5)
     Duplicate class com.google.gson.Gson$3 found in modules jetified-com.google.code.gson.gson-2.8.5 (com.google.code.gson.gson-2.8.5.jar) and jetified-gson-2.8.5 (com.google.code.gson:gson:2.8.5)
     Duplicate class com.google.gson.Gson$4 found in modules jetified-com.google.code.gson.gson-2.8.5 (com.google.code.gson.gson-2.8.5.jar) and jetified-gson-2.8.5 (com.google.code.gson:gson:2.8.5)
     Duplicate class com.google.gson.Gson$5 found in modules jetified-com.google.code.gson.gson-2.8.5 (com.google.code.gson.gson-2.8.5.jar) and jetified-gson-2.8.5 (com.google.code.gson:gson:2.8.5)
     Duplicate class com.google.gson.Gson$FutureTypeAdapter found in modules jetified-com.google.code.gson.gson-2.8.5 (com.google.code.gson.gson-2.8.5.jar) and jetified-gson-2.8.5 (com.google.code.gson:gson:2.8.5)
     Duplicate class com.google.gson.GsonBuilder found in modules jetified-com.google.code.gson.gson-2.8.5 (com.google.code.gson.gson-2.8.5.jar) and jetified-gson-2.8.5 (com.google.code.gson:gson:2.8.5)
     Duplicate class com.google.gson.InstanceCreator found in modules jetified-com.google.code.gson.gson-2.8.5 (com.google.code.gson.gson-2.8.5.jar) and jetified-gson-2.8.5 (com.google.code.gson:gson:2.8.5)
     Duplicate class com.google.gson.JsonArray found in modules jetified-com.google.code.gson.gson-2.8.5 (com.google.code.gson.gson-2.8.5.jar) and jetified-gson-2.8.5 (com.google.code.gson:gson:2.8.5)
     Duplicate class com.google.gson.JsonDeserializationContext found in modules jetified-com.google.code.gson.gson-2.8.5 (com.google.code.gson.gson-2.8.5.jar) and jetified-gson-2.8.5 (com.google.code.gson:gson:2.8.5)
     Duplicate class com.google.gson.JsonDeserializer found in modules jetified-com.google.code.gson.gson-2.8.5 (com.google.code.gson.gson-2.8.5.jar) and jetified-gson-2.8.5 (com.google.code.gson:gson:2.8.5)
     Duplicate class com.google.gson.JsonElement found in modules jetified-com.google.code.gson.gson-2.8.5 (com.google.code.gson.gson-2.8.5.jar) and jetified-gson-2.8.5 (com.google.code.gson:gson:2.8.5)
     Duplicate class com.google.gson.JsonIOException found in modules jetified-com.google.code.gson.gson-2.8.5 (com.google.code.gson.gson-2.8.5.jar) and jetified-gson-2.8.5 (com.google.code.gson:gson:2.8.5)
     Duplicate class com.google.gson.JsonNull found in modules jetified-com.google.code.gson.gson-2.8.5 (com.google.code.gson.gson-2.8.5.jar) and jetified-gson-2.8.5 (com.google.code.gson:gson:2.8.5)
     Duplicate class com.google.gson.JsonObject found in modules jetified-com.google.code.gson.gson-2.8.5 (com.google.code.gson.gson-2.8.5.jar) and jetified-gson-2.8.5 (com.google.code.gson:gson:2.8.5)
     Duplicate class com.google.gson.JsonParseException found in modules jetified-com.google.code.gson.gson-2.8.5 (com.google.code.gson.gson-2.8.5.jar) and jetified-gson-2.8.5 (com.google.code.gson:gson:2.8.5)
     Duplicate class com.google.gson.JsonParser found in modules jetified-com.google.code.gson.gson-2.8.5 (com.google.code.gson.gson-2.8.5.jar) and jetified-gson-2.8.5 (com.google.code.gson:gson:2.8.5)
     Duplicate class com.google.gson.JsonPrimitive found in modules jetified-com.google.code.gson.gson-2.8.5 (com.google.code.gson.gson-2.8.5.jar) and jetified-gson-2.8.5 (com.google.code.gson:gson:2.8.5)
     Duplicate class com.google.gson.JsonSerializationContext found in modules jetified-com.google.code.gson.gson-2.8.5 (com.google.code.gson.gson-2.8.5.jar) and jetified-gson-2.8.5 (com.google.code.gson:gson:2.8.5)
     Duplicate class com.google.gson.JsonSerializer found in modules jetified-com.google.code.gson.gson-2.8.5 (com.google.code.gson.gson-2.8.5.jar) and jetified-gson-2.8.5 (com.google.code.gson:gson:2.8.5)
     Duplicate class com.google.gson.JsonStreamParser found in modules jetified-com.google.code.gson.gson-2.8.5 (com.google.code.gson.gson-2.8.5.jar) and jetified-gson-2.8.5 (com.google.code.gson:gson:2.8.5)
     Duplicate class com.google.gson.JsonSyntaxException found in modules jetified-com.google.code.gson.gson-2.8.5 (com.google.code.gson.gson-2.8.5.jar) and jetified-gson-2.8.5 (com.google.code.gson:gson:2.8.5)
     Duplicate class com.google.gson.LongSerializationPolicy found in modules jetified-com.google.code.gson.gson-2.8.5 (com.google.code.gson.gson-2.8.5.jar) and jetified-gson-2.8.5 (com.google.code.gson:gson:2.8.5)
     Duplicate class com.google.gson.LongSerializationPolicy$1 found in modules jetified-com.google.code.gson.gson-2.8.5 (com.google.code.gson.gson-2.8.5.jar) and jetified-gson-2.8.5 (com.google.code.gson:gson:2.8.5)
     Duplicate class com.google.gson.LongSerializationPolicy$2 found in modules jetified-com.google.code.gson.gson-2.8.5 (com.google.code.gson.gson-2.8.5.jar) and jetified-gson-2.8.5 (com.google.code.gson:gson:2.8.5)
     Duplicate class com.google.gson.TypeAdapter found in modules jetified-com.google.code.gson.gson-2.8.5 (com.google.code.gson.gson-2.8.5.jar) and jetified-gson-2.8.5 (com.google.code.gson:gson:2.8.5)
     Duplicate class com.google.gson.TypeAdapter$1 found in modules jetified-com.google.code.gson.gson-2.8.5 (com.google.code.gson.gson-2.8.5.jar) and jetified-gson-2.8.5 (com.google.code.gson:gson:2.8.5)
     Duplicate class com.google.gson.TypeAdapterFactory found in modules jetified-com.google.code.gson.gson-2.8.5 (com.google.code.gson.gson-2.8.5.jar) and jetified-gson-2.8.5 (com.google.code.gson:gson:2.8.5)
     Duplicate class com.google.gson.annotations.Expose found in modules jetified-com.google.code.gson.gson-2.8.5 (com.google.code.gson.gson-2.8.5.jar) and jetified-gson-2.8.5 (com.google.code.gson:gson:2.8.5)
     Duplicate class com.google.gson.annotations.JsonAdapter found in modules jetified-com.google.code.gson.gson-2.8.5 (com.google.code.gson.gson-2.8.5.jar) and jetified-gson-2.8.5 (com.google.code.gson:gson:2.8.5)
     Duplicate class com.google.gson.annotations.SerializedName found in modules jetified-com.google.code.gson.gson-2.8.5 (com.google.code.gson.gson-2.8.5.jar) and jetified-gson-2.8.5 (com.google.code.gson:gson:2.8.5)
     Duplicate class com.google.gson.annotations.Since found in modules jetified-com.google.code.gson.gson-2.8.5 (com.google.code.gson.gson-2.8.5.jar) and jetified-gson-2.8.5 (com.google.code.gson:gson:2.8.5)
     Duplicate class com.google.gson.annotations.Until found in modules jetified-com.google.code.gson.gson-2.8.5 (com.google.code.gson.gson-2.8.5.jar) and jetified-gson-2.8.5 (com.google.code.gson:gson:2.8.5)
     Duplicate class com.google.gson.internal.$Gson$Preconditions found in modules jetified-com.google.code.gson.gson-2.8.5 (com.google.code.gson.gson-2.8.5.jar) and jetified-gson-2.8.5 (com.google.code.gson:gson:2.8.5)
     Duplicate class com.google.gson.internal.$Gson$Types found in modules jetified-com.google.code.gson.gson-2.8.5 (com.google.code.gson.gson-2.8.5.jar) and jetified-gson-2.8.5 (com.google.code.gson:gson:2.8.5)
     Duplicate class com.google.gson.internal.$Gson$Types$GenericArrayTypeImpl found in modules jetified-com.google.code.gson.gson-2.8.5 (com.google.code.gson.gson-2.8.5.jar) and jetified-gson-2.8.5 (com.google.code.gson:gson:2.8.5)
     Duplicate class com.google.gson.internal.$Gson$Types$ParameterizedTypeImpl found in modules jetified-com.google.code.gson.gson-2.8.5 (com.google.code.gson.gson-2.8.5.jar) and jetified-gson-2.8.5 (com.google.code.gson:gson:2.8.5)
     Duplicate class com.google.gson.internal.$Gson$Types$WildcardTypeImpl found in modules jetified-com.google.code.gson.gson-2.8.5 (com.google.code.gson.gson-2.8.5.jar) and jetified-gson-2.8.5 (com.google.code.gson:gson:2.8.5)
     Duplicate class com.google.gson.internal.ConstructorConstructor found in modules jetified-com.google.code.gson.gson-2.8.5 (com.google.code.gson.gson-2.8.5.jar) and jetified-gson-2.8.5 (com.google.code.gson:gson:2.8.5)
     Duplicate class com.google.gson.internal.ConstructorConstructor$1 found in modules jetified-com.google.code.gson.gson-2.8.5 (com.google.code.gson.gson-2.8.5.jar) and jetified-gson-2.8.5 (com.google.code.gson:gson:2.8.5)
     Duplicate class com.google.gson.internal.ConstructorConstructor$10 found in modules jetified-com.google.code.gson.gson-2.8.5 (com.google.code.gson.gson-2.8.5.jar) and jetified-gson-2.8.5 (com.google.code.gson:gson:2.8.5)
     Duplicate class com.google.gson.internal.ConstructorConstructor$11 found in modules jetified-com.google.code.gson.gson-2.8.5 (com.google.code.gson.gson-2.8.5.jar) and jetified-gson-2.8.5 (com.google.code.gson:gson:2.8.5)
     Duplicate class com.google.gson.internal.ConstructorConstructor$12 found in modules jetified-com.google.code.gson.gson-2.8.5 (com.google.code.gson.gson-2.8.5.jar) and jetified-gson-2.8.5 (<message truncated>

At first i only use Admob with banner and reward ad it work fine, i can build to apk but when i download native ad and build it say may class in com.google.code.gson.gson-2.8.5.jar duplicate with com.google.code.gson:gson:2.8.5. Later i see Admob v9.0.0 have a class that name NativeOverlayAd so i think problem is google is try to add native to 1 plugin and it make some class form native plugin duplicate

0

There are 0 best solutions below