Just now google has made the Kotlin as an official programming language, so started converting my files to Kotlin.
While converting my code, I am always getting null pointer exception when I try to use supportActionBar
// set up action bar
setSupportActionBar(mToolbar)
supportActionBar!!.setDisplayShowTitleEnabled(false)
// set the hamburger menu
supportActionBar!!.setDisplayHomeAsUpEnabled(true)
supportActionBar!!.setHomeButtonEnabled(true)
My AndroidManifest entry is
<activity android:name=".activities.MainActivity"
android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoActionBar />
No actionbar is having windowActionBar as false. Every time I run the app, i get the null pointer exception whiel accessing the supportActionBar. Can anyone help me about it?