Search code examples
androidandroid-studiowarningslint

Supress "This declaration is experimental and its usage should be marked with '@kotlinx.coroutines.ExperimentalCoroutinesApi'"


I've accidentally updated the Kotlin version of my project (and updated other 2 things that android studio asked me to - which I don't remember what) when I rolled back to the previous version of Kotlin, my Android Studio became a warning nightmare - every class is filled with this warning:

This declaration is experimental and its usage should be marked with '@kotlinx.coroutines.ExperimentalCoroutinesApi' or '@OptIn(kotlinx.coroutines.ExperimentalCoroutinesApi::class)'

I've already tried to find it in the warnings section of the IDE to disable it, but I couldn't find it. I can't add any code to suppress it manually.

For visuals:

enter image description here


Solution

  • For anyone wondering, the only way I could fix it was by updating my Android Studio to a newer version.