To run the code in this chapter, you will need to integrate the coroutines-core library. To do this, you should add the following line to the repositories block of the build.gradle file:
jcenter()
You should also add the following line to the dependencies block:
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:0.30.2'
Add the following line to integrate the kotlinx-coroutines-android library:
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:0.30.2'
If you are using a Kotlin version lower than 1.3, you should also add the following lines to the build.gradle file:
kotlin {
experimental {
coroutines "enable"
}
}
To integrate Spring for the Android library, you should add the following lines:
implementation 'org.springframework.android:spring-android-rest-template:2.0.0.M3'
implementation...