spierce7

    spierce7

    3 years ago
    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.
    russhwolf

    russhwolf

    3 years ago
    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.
    spierce7

    spierce7

    3 years ago
    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
    russhwolf

    russhwolf

    3 years ago
    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.
    spierce7

    spierce7

    3 years ago
    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]

    3 years ago
    Yeah, there are a bunch of known issues. This one looks something like https://youtrack.jetbrains.com/issue/KT-30116
    spierce7

    spierce7

    3 years ago
    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.
    russhwolf

    russhwolf

    3 years ago
    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
    spierce7

    spierce7

    3 years ago
    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
    russhwolf

    russhwolf

    3 years ago
    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.
    spierce7

    spierce7

    3 years ago
    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