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
from Lint checking doesn't work for Java but works for Kotlin in Android Studio




No comments:
Post a Comment