当前位置:   article > 正文

Android 删除aar包中的jar包解决Duplicate class包冲突问题_duplicate class com.google.gson.defaultdatetypeada

duplicate class com.google.gson.defaultdatetypeadapter found in modules jeti

项目开发编译过程中报如下错误,排查后发现是因为

  1. Duplicate class com.google.gson.DefaultDateTypeAdapter found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  2. Duplicate class com.google.gson.ExclusionStrategy found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  3. Duplicate class com.google.gson.FieldAttributes found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  4. Duplicate class com.google.gson.FieldNamingPolicy found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  5. Duplicate class com.google.gson.FieldNamingPolicy$1 found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  6. Duplicate class com.google.gson.FieldNamingPolicy$2 found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  7. Duplicate class com.google.gson.FieldNamingPolicy$3 found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  8. Duplicate class com.google.gson.FieldNamingPolicy$4 found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  9. Duplicate class com.google.gson.FieldNamingPolicy$5 found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  10. Duplicate class com.google.gson.FieldNamingStrategy found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  11. Duplicate class com.google.gson.Gson found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  12. Duplicate class com.google.gson.Gson$1 found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  13. Duplicate class com.google.gson.Gson$2 found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  14. Duplicate class com.google.gson.Gson$3 found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  15. Duplicate class com.google.gson.Gson$4 found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  16. Duplicate class com.google.gson.Gson$5 found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  17. Duplicate class com.google.gson.Gson$FutureTypeAdapter found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  18. Duplicate class com.google.gson.GsonBuilder found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  19. Duplicate class com.google.gson.InstanceCreator found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  20. Duplicate class com.google.gson.JsonArray found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  21. Duplicate class com.google.gson.JsonDeserializationContext found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  22. Duplicate class com.google.gson.JsonDeserializer found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  23. Duplicate class com.google.gson.JsonElement found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  24. Duplicate class com.google.gson.JsonIOException found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  25. Duplicate class com.google.gson.JsonNull found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  26. Duplicate class com.google.gson.JsonObject found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  27. Duplicate class com.google.gson.JsonParseException found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  28. Duplicate class com.google.gson.JsonParser found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  29. Duplicate class com.google.gson.JsonPrimitive found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  30. Duplicate class com.google.gson.JsonSerializationContext found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  31. Duplicate class com.google.gson.JsonSerializer found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  32. Duplicate class com.google.gson.JsonStreamParser found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  33. Duplicate class com.google.gson.JsonSyntaxException found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  34. Duplicate class com.google.gson.LongSerializationPolicy found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  35. Duplicate class com.google.gson.LongSerializationPolicy$1 found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  36. Duplicate class com.google.gson.LongSerializationPolicy$2 found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  37. Duplicate class com.google.gson.TypeAdapter found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  38. Duplicate class com.google.gson.TypeAdapter$1 found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  39. Duplicate class com.google.gson.TypeAdapterFactory found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  40. Duplicate class com.google.gson.annotations.Expose found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  41. Duplicate class com.google.gson.annotations.SerializedName found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  42. Duplicate class com.google.gson.annotations.Since found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  43. Duplicate class com.google.gson.annotations.Until found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  44. Duplicate class com.google.gson.internal.$Gson$Preconditions found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  45. Duplicate class com.google.gson.internal.$Gson$Types found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  46. Duplicate class com.google.gson.internal.$Gson$Types$GenericArrayTypeImpl found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  47. Duplicate class com.google.gson.internal.$Gson$Types$ParameterizedTypeImpl found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  48. Duplicate class com.google.gson.internal.$Gson$Types$WildcardTypeImpl found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  49. Duplicate class com.google.gson.internal.ConstructorConstructor found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  50. Duplicate class com.google.gson.internal.ConstructorConstructor$1 found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  51. Duplicate class com.google.gson.internal.ConstructorConstructor$10 found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  52. Duplicate class com.google.gson.internal.ConstructorConstructor$11 found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  53. Duplicate class com.google.gson.internal.ConstructorConstructor$12 found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  54. Duplicate class com.google.gson.internal.ConstructorConstructor$2 found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  55. Duplicate class com.google.gson.internal.ConstructorConstructor$3 found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  56. Duplicate class com.google.gson.internal.ConstructorConstructor$4 found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  57. Duplicate class com.google.gson.internal.ConstructorConstructor$5 found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  58. Duplicate class com.google.gson.internal.ConstructorConstructor$6 found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  59. Duplicate class com.google.gson.internal.ConstructorConstructor$7 found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  60. Duplicate class com.google.gson.internal.ConstructorConstructor$8 found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  61. Duplicate class com.google.gson.internal.ConstructorConstructor$9 found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  62. Duplicate class com.google.gson.internal.Excluder found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  63. Duplicate class com.google.gson.internal.Excluder$1 found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  64. Duplicate class com.google.gson.internal.JsonReaderInternalAccess found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  65. Duplicate class com.google.gson.internal.LazilyParsedNumber found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  66. Duplicate class com.google.gson.internal.LinkedTreeMap found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  67. Duplicate class com.google.gson.internal.LinkedTreeMap$1 found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  68. Duplicate class com.google.gson.internal.LinkedTreeMap$EntrySet found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  69. Duplicate class com.google.gson.internal.LinkedTreeMap$EntrySet$1 found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  70. Duplicate class com.google.gson.internal.LinkedTreeMap$KeySet found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  71. Duplicate class com.google.gson.internal.LinkedTreeMap$KeySet$1 found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  72. Duplicate class com.google.gson.internal.LinkedTreeMap$LinkedTreeMapIterator found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  73. Duplicate class com.google.gson.internal.LinkedTreeMap$Node found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  74. Duplicate class com.google.gson.internal.ObjectConstructor found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  75. Duplicate class com.google.gson.internal.Primitives found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  76. Duplicate class com.google.gson.internal.Streams found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  77. Duplicate class com.google.gson.internal.Streams$AppendableWriter found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  78. Duplicate class com.google.gson.internal.Streams$AppendableWriter$CurrentWrite found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  79. Duplicate class com.google.gson.internal.UnsafeAllocator found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  80. Duplicate class com.google.gson.internal.UnsafeAllocator$1 found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  81. Duplicate class com.google.gson.internal.UnsafeAllocator$2 found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  82. Duplicate class com.google.gson.internal.UnsafeAllocator$3 found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  83. Duplicate class com.google.gson.internal.UnsafeAllocator$4 found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  84. Duplicate class com.google.gson.internal.bind.ArrayTypeAdapter found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  85. Duplicate class com.google.gson.internal.bind.ArrayTypeAdapter$1 found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  86. Duplicate class com.google.gson.internal.bind.CollectionTypeAdapterFactory found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  87. Duplicate class com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  88. Duplicate class com.google.gson.internal.bind.DateTypeAdapter found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  89. Duplicate class com.google.gson.internal.bind.DateTypeAdapter$1 found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  90. Duplicate class com.google.gson.internal.bind.JsonTreeReader found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  91. Duplicate class com.google.gson.internal.bind.JsonTreeReader$1 found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  92. Duplicate class com.google.gson.internal.bind.JsonTreeWriter found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  93. Duplicate class com.google.gson.internal.bind.JsonTreeWriter$1 found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  94. Duplicate class com.google.gson.internal.bind.MapTypeAdapterFactory found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  95. Duplicate class com.google.gson.internal.bind.MapTypeAdapterFactory$Adapter found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  96. Duplicate class com.google.gson.internal.bind.ObjectTypeAdapter found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  97. Duplicate class com.google.gson.internal.bind.ObjectTypeAdapter$1 found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  98. Duplicate class com.google.gson.internal.bind.ObjectTypeAdapter$2 found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  99. Duplicate class com.google.gson.internal.bind.ReflectiveTypeAdapterFactory found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  100. Duplicate class com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1 found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  101. Duplicate class com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  102. Duplicate class com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$BoundField found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  103. Duplicate class com.google.gson.internal.bind.SqlDateTypeAdapter found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  104. Duplicate class com.google.gson.internal.bind.SqlDateTypeAdapter$1 found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  105. Duplicate class com.google.gson.internal.bind.TimeTypeAdapter found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  106. Duplicate class com.google.gson.internal.bind.TimeTypeAdapter$1 found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  107. Duplicate class com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  108. Duplicate class com.google.gson.internal.bind.TypeAdapters found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  109. Duplicate class com.google.gson.internal.bind.TypeAdapters$1 found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  110. Duplicate class com.google.gson.internal.bind.TypeAdapters$10 found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  111. Duplicate class com.google.gson.internal.bind.TypeAdapters$11 found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  112. Duplicate class com.google.gson.internal.bind.TypeAdapters$12 found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  113. Duplicate class com.google.gson.internal.bind.TypeAdapters$13 found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  114. Duplicate class com.google.gson.internal.bind.TypeAdapters$14 found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  115. Duplicate class com.google.gson.internal.bind.TypeAdapters$15 found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  116. Duplicate class com.google.gson.internal.bind.TypeAdapters$16 found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  117. Duplicate class com.google.gson.internal.bind.TypeAdapters$17 found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  118. Duplicate class com.google.gson.internal.bind.TypeAdapters$18 found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  119. Duplicate class com.google.gson.internal.bind.TypeAdapters$19 found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  120. Duplicate class com.google.gson.internal.bind.TypeAdapters$2 found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  121. Duplicate class com.google.gson.internal.bind.TypeAdapters$20 found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  122. Duplicate class com.google.gson.internal.bind.TypeAdapters$21 found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  123. Duplicate class com.google.gson.internal.bind.TypeAdapters$22 found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  124. Duplicate class com.google.gson.internal.bind.TypeAdapters$23 found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  125. Duplicate class com.google.gson.internal.bind.TypeAdapters$24 found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  126. Duplicate class com.google.gson.internal.bind.TypeAdapters$25 found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  127. Duplicate class com.google.gson.internal.bind.TypeAdapters$26 found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  128. Duplicate class com.google.gson.internal.bind.TypeAdapters$27 found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  129. Duplicate class com.google.gson.internal.bind.TypeAdapters$28 found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  130. Duplicate class com.google.gson.internal.bind.TypeAdapters$29 found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  131. Duplicate class com.google.gson.internal.bind.TypeAdapters$3 found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  132. Duplicate class com.google.gson.internal.bind.TypeAdapters$30 found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  133. Duplicate class com.google.gson.internal.bind.TypeAdapters$31 found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  134. Duplicate class com.google.gson.internal.bind.TypeAdapters$32 found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  135. Duplicate class com.google.gson.internal.bind.TypeAdapters$4 found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  136. Duplicate class com.google.gson.internal.bind.TypeAdapters$5 found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  137. Duplicate class com.google.gson.internal.bind.TypeAdapters$6 found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  138. Duplicate class com.google.gson.internal.bind.TypeAdapters$7 found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  139. Duplicate class com.google.gson.internal.bind.TypeAdapters$8 found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  140. Duplicate class com.google.gson.internal.bind.TypeAdapters$9 found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  141. Duplicate class com.google.gson.internal.bind.TypeAdapters$EnumTypeAdapter found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  142. Duplicate class com.google.gson.reflect.TypeToken found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  143. Duplicate class com.google.gson.stream.JsonReader found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  144. Duplicate class com.google.gson.stream.JsonReader$1 found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  145. Duplicate class com.google.gson.stream.JsonScope found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  146. Duplicate class com.google.gson.stream.JsonToken found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  147. Duplicate class com.google.gson.stream.JsonWriter found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  148. Duplicate class com.google.gson.stream.MalformedJsonException found in modules gson-2.2.4.jar (com.xindecoiot.xdreader:zebra-scanner:2.4.6) and gson-2.8.5.jar (com.google.code.gson:gson:2.8.5)
  149. Go to the documentation to learn how to Fix dependency resolution errors.

排查后发现是因为重复引用了不同版本的gson包导致的包冲突,在引用的zebra-scanner这个包含包含了一个gson的jar包,导致了包冲突

  1. dependencies {
  2. implementation 'com.xindecoiot.xdreader:zebra-scanner:2.4.6'
  3. implementation 'com.google.code.gson:gson:2.8.5'
  4. }

由于zebra-scanner中的gson包版本比较低,我想要删除里面的jar,但是这个人家第三方的包,该如何删呢?

一种思路是找到这个aar包,然后解压把里面的gson的jar包删除,再重新打包。

但是上面这种方法稍显麻烦,而且我也未验证是否可行。

还有一种方法是在Android Studio中的External Libraries中展开相应的aar包,然后直接删除里面不要的jar包即可,这种方法亲测可行,而且简单快速。

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/Gausst松鼠会/article/detail/536113
推荐阅读
相关标签
  

闽ICP备14008679号