January 2018
Intermediate to advanced
434 pages
14h 1m
English
We will be using Android Studio 3.0 for coding purposes. Coroutines are provided as a library that abstracts all the complexities and lets the library handle it. You need to add the library to the build.gradle file, like this:
dependencies { ... compile "org.jetbrains.kotlinx:kotlinx-coroutines-core:0.19.2" }
This library is published to the Bintray JCenter repository, so you need to add jcenter() in your repositories, as shown:
repositories { jcenter()}
One thing to note is that coroutines are experimental in Kotlin 1.1, so you need to explicitly tell the compiler that you know it and you are game for it. To do so, you need to add the following lines to your build.gradle file:
apply plugin: 'kotlin' kotlin { experimental ...Read now
Unlock full access