I've been using Kotlin for a long time, but recently I opened a Java project and I noticed that Android Studio isn't recognizing the Java code properly as the same as Kotlin. For example when I write Java code the lint checking isn't working at all. I'm having a hard time knowing what errors I made and what classes need importing and even the code style isn't applied as the settings.
On the other hand, when I create a Kotlin class on the same project, everything works well.
I've tried opening multiple Java projects and it's the same thing, so it's not a project-specific issue.
Keeping in mind that the project works well and runs without any problem as long there are no errors in the code.
Here's pictures showing the problem:
Java Code: No Errors but code style not applied

Java Code: Error found but no erorr highlighting

Kotlin Code: No Errors and code style is applied

Kotlin Code: Error found and lint is working well


