I have a kotlin activity used as splashscreen to check if the user is already logged in using Google services or not. After awaiting 600ms it should create an intent to redirect the user on the LoginActivity or MainActivity using the ActiviyClass::class.java
For some reason Android studio marks "java" in red and tells "Unresolved reference: java", where did i mess up?
Code:
var intent = Intent(this, MainActivity::class.java)
if(!isLoggedIn()){
intent = Intent(this, LoginActivity::class.java)
}
Possible solution :
1- Try invalidate cache and restart your Android studio. I am attaching screen shot of place where you can find this option.
Happy coding!!