Please I am working with kotlin and when I tried to move from one Activity to another using an intent, i got an error on the java keyword which says "unresolved reference" when i click to see some suggestions they told me to create an Extension property of Kclass.java. I don't really know what is the issue as i have tried so many suggestions but still cant solve it. Here is the code.
class WelcomeActivity : AppCompatActivity() {
var firebaseUser: FirebaseUser? = null
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_welcome)
}
override fun onStart() {
super.onStart()
firebaseUser = FirebaseAuth.getInstance().currentUser
if(firebaseUser !=null){
val intent = Intent(this@WelcomeActivity,MainActivity::class.java)
startActivity(intent)
finish()
}
}
}