Home > Software engineering >  I have error related retrofit dependency how can I resolve it?
I have error related retrofit dependency how can I resolve it?

Time:06-30

Unable to resolve dependency for ':app@debugAndroidTest/compileClasspath': Could not resolve com.squareup.retrofit2:retrofit:2.4.0. I have this kind of error and how it to solve. I have already added dependency like implementation 'com.squareup.retrofit2:retrofit:2.4.0' implementation 'com.squareup.retrofit2:converter-gson:2.4.0'

CodePudding user response:

Add these dependencies Retrofit Libraries implementation 'com.squareup.retrofit2:retrofit:2.7.2' implementation 'com.squareup.retrofit2:converter-gson:2.7.2' OkHttp Libraries implementation 'com.squareup.okhttp3:okhttp:4.10.0' implementation 'com.squareup.okhttp3:logging-interceptor:4.2.2'

CodePudding user response:

Change the version like:

implementation 'com.squareup.retrofit2:retrofit:2.9.0'

for the gson:

  implementation 'com.google.code.gson:gson:2.9.0'

Then it will work.

  • Related