The one above is a package repackaged by retrofit itself, while the bottom one is Google’s official GSON package. A situation often occurs where retrofit is used, and then some third-party projects are used that rely on official Gson development projects, and then there is no All methods can only be used. This is a problem that often occurs when using third-party open source projects.
You should just pass the code that references converter-gson:2.1.0'. It may be that the compilation tool defaults to using Google's gson package after seeing gson.
1. The dependency of converter-gson is transparently transmitted, so that the dependency of gson is automatically added. 2. You can use @aar to turn off transparent transmission
The one above is a package repackaged by retrofit itself, while the bottom one is Google’s official GSON package. A situation often occurs where retrofit is used, and then some third-party projects are used that rely on official Gson development projects, and then there is no All methods can only be used. This is a problem that often occurs when using third-party open source projects.
You should just pass the code that references converter-gson:2.1.0'. It may be that the compilation tool defaults to using Google's gson package after seeing gson.
Default relies on gson and uses gson to parse json. You no longer need to reference the gson library separately
1. The dependency of converter-gson is transparently transmitted, so that the dependency of gson is automatically added.
2. You can use @aar to turn off transparent transmission