Hey guys! I'm having trouble getting the following...
# android
m
Hey guys! I'm having trouble getting the following piece of code to compile:
Copy code
val fragmentManager = supportFragmentManager

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)

        val sectionsFragment: SectionsFragment? = SectionsFragment()
        fragmentManager.beginTransaction()
            .add(R.id.activity_main_fragment_container, sectionsFragment)
            .commit()

    }
I get the error that:
Copy code
None of the following functions can be called with the arguments supplied:
public abstract fun add(p0: Fragment!, p1: String!): FragmentTransaction! defined in android.support.v4.app.FragmentTransaction
public abstract fun add(@IdRes p0: Int, p1: Fragment!): FragmentTransaction! defined in android.support.v4.app.FragmentTransaction
I've just started using Kotlin. However, I can't recall what
Fragment!
indicates... Would anyone have any insight into this?