Retrofit: Error:(31, 13) Failed to resolve: com.squareup.retrofit2:converter-gson:latest.version

Created on 7 Dec 2016  路  7Comments  路  Source: square/retrofit

Hello, I'm created new Android project for use retrofit. But when I add in dependencies it gives error in download. Failed to resolve: com.squareup.retrofit2:converter-gson:latest.version

dependencies {
   compile 'com.squareup.retrofit2:retrofit:2.1.0'
   compile 'com.squareup.retrofit2:converter-gson:latest.version'
}

No need to add "convert-gson" dependencies?

Most helpful comment

Fixed: compile 'com.squareup.retrofit2:converter-gson:2.1.0' However in the documentation is: com.squareup.retrofit2:converter-gson:latest.version

All 7 comments

Fixed: compile 'com.squareup.retrofit2:converter-gson:2.1.0' However in the documentation is: com.squareup.retrofit2:converter-gson:latest.version

good

Thanks for the solution

Thanks for the solution.

I followed your instruction and got

ERROR: Unable to resolve dependency for ':app@debug/compileClasspath': Could not find any version that matches com.squareup.retrofit2:converter-gson:latest.version.

instead.

just use the same version which the retrofit is:

implementation 'com.squareup.retrofit2:retrofit:2.5.0'
implementation 'com.squareup.retrofit2:converter-gson:2.5.0'

this is it!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kkunsue picture kkunsue  路  3Comments

attaullahpro picture attaullahpro  路  3Comments

jpshelley picture jpshelley  路  4Comments

JerzyPuchalski picture JerzyPuchalski  路  3Comments

colintheshots picture colintheshots  路  3Comments