Backstack management : Restarter must be created only during owner's initialization stage
问题 I am using a bottom navigation bar in my MainActivity to handle some fragments. This is the code used for switching between them: private val mOnNavigationItemSelectedListener = BottomNavigationView.OnNavigationItemSelectedListener { item -> if (item.isChecked && supportFragmentManager.findFragmentById(R.id.act_main_fragment_container) != null ) return@OnNavigationItemSelectedListener false val fragment = when (item.itemId) { R.id.navigation_home -> fragments[0] R.id.navigation_bookings ->