agiwale smita
agiwale smita

Reputation: 41

Error: Failed to resolve: retrofit-2.9.0-2.9.0

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

Answers (5)

Cəfər Tarverdiyev
Cəfər Tarverdiyev

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

Azamat D
Azamat D

Reputation: 21

Had the same problem. Just try to make a File -> Invalidate Caches / Restart... and retrofit dependencies will be resolved.

Upvotes: 1

agiwale smita
agiwale smita

Reputation: 41

sometimes gradle gives such errors.. you can create dependencies through module settings. check it.. it works.

Upvotes: 1

ahmad bajwa
ahmad bajwa

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

Twisha Kotecha
Twisha Kotecha

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

Related Questions