Navigation Component: java.lang.IllegalStateException: Fragment not attached to a context

前端 未结 0 1058
别跟我提以往
别跟我提以往 2021-01-03 13:46

I have a method in fragment for testing purpose.

fun showToastAndLog(message: String) {
    Toast.makeText(requireContext(), message, Toast.LENGTH_LONG).show(         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题