'Android studio linter not working when opening the android directory of a flutter plugin

In a normal flutter project (app, not a plugin), when I open the android directory with Android Studio, the linter works. However, if it's a plugin, all that Android Studio does is highlights the syntax. I can write any gibberish and it will not show any warning.

I'm new to Kotlin (learning it on the go as I'm writing the plugin) so I can't write code like that. How can I make the linter work?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source