fbpx

Course Content

Total learning: 10 lessons Time: 2 hours

Подключение Retrofit, GSON и Logging-interceptor

Для использования библиотеки Retrofit и обработки ответа от бэкенда, необходимо подключить эти библиотеки в файле build.gradle (Module: app).

Вы должны прописать следующие:

implementation 'com.squareup.retrofit2:retrofit:2.9.0'
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
implementation 'com.squareup.okhttp3:logging-interceptor:4.1.1'

После добавления, ваш build.gradle должен примерно выглядеть так: