I am building a weather forecast app using API from this(openweathermap.org) website. For this I have used two dependencies such as
1.('com.appunity.retrofit2:converter-gson:2.0.2')
2.('com.squareup.retrofit:retrofit:2.0.0-beta2')
.
And I got this type of error that I have given below.
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.