I'm working on a KMM project targeting iOS and And...
# multiplatform
j
I'm working on a KMM project targeting iOS and Android, and occasionally when I try to edit the KMM module's build.gradle.kts file, the entire thing lights up with "Unresolved reference" errors. At the time of my last commit, the project had no errors. Now, even though build.gradle.kts is completely unchanged from my last commit, it has 48 "Unresolved reference" errors, most of which are on basic keywords like "implementation" and "sourceSets". Any idea what could be causing this?
f
Invalidate and restarting solves your problem??
h
Try Kotlin Plugin 1.5.31
j
Sometimes it does, sometimes it does not. I deleted the entire project locally and re-cloned it from GitHub, and that resolved the issue, although I lost a lot of time and all my uncommitted changes.
Even stranger, sometimes invalidating and restarting causes the errors to appear, when the project was previously error-free.
m
I've been having something ike that, not sure if it's related. What I've found is that, apparently randomly (I doubt that it is), my source code directories get unmarked. Re-marking them "fixes" the problem.
m
We raised similar issues https://youtrack.jetbrains.com/issue/KTIJ-18903 It should be fixed but still happening
🙏 1
m
it is related with the
Copy code
com.android.tools.build:gradle:7.1.0-alpha12
if I am not mistaken it is all red after
alpha5
in my project. And when i revert it and load the project with a new Android studio I do not have same problem
k
I'm having the same issue. Tons of import errors in the IDE but everything builds and runs smoothly.
m
it seems to be fixed for me with the newest android studio
Chipmunk
👍 1
k
Darn I'm still having the issue with Chipmunk