I know similar questions exist already. But my case seems different. I have these inline compiler error ONLY in the files that are Flavor specific; added in "...\src\myFlavor\..."
. And even the basic classes are not found, check the image attached in the end. When I run the app, it compiles and runs fine.
I have tried these steps already:
I even did a fresh install of Android Studio on another laptop and pulled my code there. Nothing resolves this.
I have more than 5 flavors in my app.
I am using the following versions of gradle, kotlin and Android studio.
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.20"
api "org.jetbrains.kotlin:kotlin-stdlib:1.7.20"
Android Studio: Dolphin | 2021.3.1 Patch 1
This issue is old, I was living with it. So now I added this question here. Please help me with it. It makes development very hard on these files.
I reported the issue and Android team guided me.
I installed Android Studio Flamingo and the issue got resolved.
I didnt know there was a new version out there cz I used to "check for updates" and it said u have the latest version.