我正在使用来自这个(openweathermap.org)网站的API构建天气预报应用。为此,我使用了两个依赖项,例如
1。('com.appunity.retrofit2:converter-gson:2.0.2')
2。('com.squareup.retrofit:retrofit:2.0.0-beta2')
。
然后我在下面给出了这种错误。
Duplicate class retrofit2.http.Path found in modules jetified-retrofit-2.0.2.jar (com.appunity.retrofit2:retrofit:2.0.2) and jetified-retrofit-2.5.0.jar (com.squareup.retrofit2:retrofit:2.5.0)
Duplicate class retrofit2.http.Query found in modules jetified-retrofit-2.0.2.jar (com.appunity.retrofit2:retrofit:2.0.2) and jetified-retrofit-2.5.0.jar (com.squareup.retrofit2:retrofit:2.5.0)
Duplicate class retrofit2.http.QueryMap found in modules jetified-retrofit-2.0.2.jar (com.appunity.retrofit2:retrofit:2.0.2) and jetified-retrofit-2.5.0.jar (com.squareup.retrofit2:retrofit:2.5.0)
Duplicate class retrofit2.http.Streaming found in modules jetified-retrofit-2.0.2.jar (com.appunity.retrofit2:retrofit:2.0.2) and jetified-retrofit-2.5.0.jar (com.squareup.retrofit2:retrofit:2.5.0)
Duplicate class retrofit2.http.Url found in modules jetified-retrofit-2.0.2.jar (com.appunity.retrofit2:retrofit:2.0.2) and jetified-retrofit-2.5.0.jar (com.squareup.retrofit2:retrofit:2.5.0)
Go to the documentation to learn how to Fix dependency resolution errors.