66.2 Adding Coroutine Support to the Project
The current version of Android Studio does not automatically include support for coroutines in newly created projects. Before proceeding, therefore, edit the Gradle Scripts -> build.gradle (Module: app) file and add the following lines to the dependencies section (noting, as always, that newer versions of the libraries may be available):
dependencies {
.
.
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.2'
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.2'
.
.
}
After making the change, click on the Sync Now link at the top of the editor panel to commit the changes.