https://kotlinlang.org logo
s

spierce7

07/01/2019, 5:11 PM
I'm converting a large android project that uses several
kotlin-multiplatform-<platform>
plugins to use the
multiplatform
plugin. I'm several weeks into this, and have the app building, but for some reason the IDE is showing some imports as unable to resolve (again, the app can build, and I've added the dependencies properly to the corresponding gradle files). The issue seems to be around the android multiplatform projects importing jvm multiplatform projects, and then the android project complains that it can't find jvm files. Has anyone seen something like this? I can repro this in my project with AndroidStudio, IntelliJ, and AndroidStudio 3.5 with the upgraded beta05 plugin as well.
r

russhwolf

07/01/2019, 5:25 PM
Not sure if this is what you're hitting but there are known issues with IDE support for more complex project structures, eg https://youtrack.jetbrains.com/issue/KT-27801.
s

spierce7

07/01/2019, 6:42 PM
So I just tried to reproduce this with a smaller project and failed. I had a co-worker open up my branch, and he can't reproduce it. His IDE resolves the classes. I've cleared my cache and restarted, and even deleted the IDE cache as well. I'm at a loss
r

russhwolf

07/01/2019, 6:55 PM
Have you tried re-importing the project on your machine? Sometimes something gets messed up in some arcane corner of the IDE config. You can try deleting/renaming your .idea folder and re-opening so that all gets regenerated, but note that means you'd lose a bunch of settings like run configurations that live in there.
s

spierce7

07/01/2019, 7:51 PM
I re-checked out the project with a new location, and I was able to repro. I was able to get one of my coworkers to repro this way also
I can access the module from the common layer
a

Alexey Belkov [JB]

07/02/2019, 8:41 AM
Yeah, there are a bunch of known issues. This one looks something like https://youtrack.jetbrains.com/issue/KT-30116
s

spierce7

07/02/2019, 5:10 PM
Thanks for the message @Alexey Belkov [JB]. The ticket you sent indeed sounds like the issue
I'm surprised a bug like this was found so long ago but hasn't been fixed. I'm surprised there are so many large bugs currently for multiplatform, though I imagine some of these are duplicates.
I guess we have to hold off on moving over for now.
r

russhwolf

07/02/2019, 5:15 PM
In my experience the issues are much more around IDE support, which means usually things still build even if you get some red in the editor. That's not much different than how I remember the separate platform plugins behaving
s

spierce7

07/02/2019, 5:34 PM
It's difficult to commit to my team experiencing that red though. We'll have to stick with the kotlin-platform-<platform> plugins for now I guess
r

russhwolf

07/02/2019, 5:40 PM
Do you not get red with the separate platform plugins? Maybe that's gotten better than I remember it. My memory was that for native in particular everything would always be red in the IDE for that plugin too.
s

spierce7

07/02/2019, 5:47 PM
we are only compiling with jvm and android artifacts for now. The intent of switching to the multiplatform plugin was to add support for native
👍 1
2 Views