I am trying to use Jetbrains\' Anko library to easily display an Android toast message in my app.
Here is the relevant code snippet:
val message : CharSe
I encountered the same issue using import android.support.v4.app.Fragment
.
As Kingsley Adio said in a previous comment, add the following line in the dependencies specified in your module gradle file:
dependencies
{
...
implementation "org.jetbrains.anko:anko-support.v4-commons:$your_anko_version"
...
}
Then add this import in your .kt file:
import org.jetbrains.anko.support.v4.toast
Since the error says none are applicable you've probably imported a different Fragment
class than the one defined by Android/Support Library.
Check your imports.