Instead of launching in a global scope, local scope is now default

While in experimental status, when you launched a new coroutine it was launched in a global scope and it could outlive the very component it was launched in, as described in this issue.

This behavior was changed: coroutines now launch in a local scope per default, which means it is bound to the scope lifetime: if the component dies, so does the coroutine.

To keep the old behavior in the new API, you need to change from:

launch { doSomething() }

To:

GlobalScope.launch { doSomething() }

However, you really should think about what the appropriate lifetime and scope of each coroutine you launch should be. For instance, if a coroutine changes UI elements of the component it was launched in, it makes no sense for it to be in GlobalScope, and it could crash if the component dies while the coroutine is alive: its lifetime should be the same as (or less than) the UI elements it touches.