Reputation: 41
I am running the following code:
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
implementation 'com.squareup.retrofit2:retrofit:converter-scalars:2.9.0'
upon doing sync I get an error:
Failed to resolve: retrofit-2.9.0-2.9.0
Upvotes: 3
Views: 5182
Reputation: 31
implementation 'com.squareup.retrofit2:retrofit:2.7.1' implementation 'com.squareup.retrofit2:converter-gson:2.7.1' I wrote this and gradle succesfully downloaded, then I converted retrofit version to 2.9.0 and worked like a charm.
Upvotes: 0
Reputation: 21
Had the same problem. Just try to make a File -> Invalidate Caches / Restart... and retrofit dependencies will be resolved.
Upvotes: 1
Reputation: 41
sometimes gradle gives such errors.. you can create dependencies through module settings. check it.. it works.
Upvotes: 1
Reputation: 1068
These are the latest retrofit
dependencies.
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
Upvotes: 4
Reputation: 1104
Hi you can try the below lines
implementation 'com.squareup.retrofit2:retrofit:2.7.1'
implementation 'com.squareup.retrofit2:converter-gson:2.7.1'
Upvotes: 2