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?
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!
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