In Android Studio I have red all over my code, "im...
# getting-started
m
In Android Studio I have red all over my code, "import io.ktor.<anything> has "ktor" in red, "serialization" in "import kotlinx.serialization.SerialName" is also red, but the (Android) app builds. Errr, whut? It's only just started happening (although it's not unknown previously here), so I suppose I've changed something, but what could it be?
p
Try File -> Invalidate Caches & Restart, sounds like the IDE is out of sync with 'reality' or at least Gradle
m
I agree, and I'm beginning to doubt my sanity, and reality. I've not only tried that (invalidate & restart, a few times), I've rebuilt the project, I've removed .idea/workspace.xml, I've even tried whistling dixie, doesn't seem to help :(
j
You could try deleting your build folders too, some aren’t deleted when you invalidate. Failing that, if you code is version contrlled, you create a new copy of the project and open it fresh (a git clone into a different folder or the equivalent for any other VCS system)
c
@Jiddles if the app compiles & runs, the problem can't be in the
build/
folder (which is entirely managed by Gradle)
j
There was a bug recently with a recent Kotlin plugin and recent IDEs, but I don't know which exact combination. If nothing else works you might want to try reverting to the bundled version of the Kotlin plugin
m
"Bundled version" @Joffrey?
j
I mean the version of the Kotlin plugin that is bundled with the IDE (without extra installation). Not sure for Android Studio but it is likely bundled as well. To revert to the bundled version, in IDEA you can uninstall the Kotlin plugin from the Settings > Plugins. It might be similar in AS.
đź‘Ť 1