onClick(CoroutineContext) Unit is deprecated Kotlin Anko

665 Views Asked by At

I have migrated my project to Kotlin 1.3 and then it is showing this

Deprecated OnClick warning

Was that means we have to use the again the long and old fashioned setOnClickListener method or they have introduced some another method. And why they are dropping it?

1

There are 1 best solutions below

1
On

The 0.10.7 release has two satellites 0.10.7-eap13 and 0.10.7-rc13 which are meant to be used with Kotlin 1.3 and release kotlinx.coroutines. Feel free to try them and provide any feedback.

Github/Kotlin/Anko

I just tried "0.10.7-rc13" instead of "0.10.7" and it's working for now. You also have to update imports from "sdk25" to "sdk27".