https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
j

jimmyt

09/27/2021, 4:53 PM
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

Francis Mariano

09/27/2021, 5:00 PM
Invalidate and restarting solves your problem??
h

hfhbd

09/27/2021, 5:08 PM
Try Kotlin Plugin 1.5.31
j

jimmyt

09/27/2021, 5:22 PM
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

MarkRS

09/28/2021, 8:00 AM
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

Marco Righini

09/28/2021, 9:37 AM
We raised similar issues https://youtrack.jetbrains.com/issue/KTIJ-18903 It should be fixed but still happening
🙏 1
m

Mustafa Ozhan

09/28/2021, 10:55 AM
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

Kirill Langer

10/21/2021, 9:04 PM
I'm having the same issue. Tons of import errors in the IDE but everything builds and runs smoothly.
m

Mustafa Ozhan

10/21/2021, 10:45 PM
it seems to be fixed for me with the newest android studio
Chipmunk
👍 1
k

Kirill Langer

10/22/2021, 5:06 PM
Darn I'm still having the issue with Chipmunk
16 Views