Issue
let me ask
I use kotlin coroutine
@OptIn(DelicateCoroutinesApi::class)
GlobalScope.launch {
displaySura()
}
and in the build tab showing warning:
This annotation should be used with the compiler argument '-opt-in=kotlin.RequiresOptIn'
how to solve this warning? thanks in advance
Solution
You can add -opt-in=kotlin.RequiresOptIn
compiler argument in the build file:
compileKotlin {
kotlinOptions {
freeCompilerArgs += [
"-Xopt-in=kotlin.RequiresOptIn"
]
}
}
Answered By - Sergio
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.