Thread
#multiplatform
    m

    Michal Klimczak

    1 year ago
    I'm slowly losing my mind over Android Studio Canary 15. Suddenly (it worked fine for a few days and then stopped) it went rogue with indexing and I can't fix it. I tried every trick in the book including removing android studio, restarting computer, removing AS settings etc. Everything from here as well: https://kotlinlang.slack.com/archives/CRDCFF3RC/p1618779620052500 Project builds just fine, it's just that Android studio doesn't index most classes, including very basic ones like platform.Foundation or any external libraries. It stopped marking the right directories as sources root like you see in the screenshot. I can mark them manually, but it doesn't fix the issue with indexing libraries or
    platform.*
    etc. I guess the problem is with it not properly collecting sources, but how do I fix it?
    iamthevoid

    iamthevoid

    1 year ago
    Try to build last stable commit. I met similar behavior when i was implementing sql delight.
    The solution was is to separate ios targets
    m

    Michal Klimczak

    1 year ago
    I already moved to my develop branch which worked fine yesterday. And I do have this separate ios targets. Maybe I'll try to move even further back in history
    iamthevoid

    iamthevoid

    1 year ago
    I don’t know then. BTW last friday i’ve downloaded AS canary 15 and after epic battle with buildSrc i’ve downgraded it to 14. It is poor advice, but maybe (if you have not enough time for example) it is better solution than stucking into build problems.
    Maybe next version will be more stable
    m

    Michal Klimczak

    1 year ago
    I'm struggling for a few hours now so I will probably try downgrading
    @iamthevoid since you're so kind to help me - would you please tell me which version of jdk you have in you prefs? https://kotlinlang.slack.com/archives/CJLTWPH7S/p1618868738157900?thread_ts=1618852737.133800&cid=CJLTWPH7S
    iamthevoid

    iamthevoid

    1 year ago
    I use 11.0.10 (adoptopenjdk)
    Tried to swith on 16.0.1 with no problems, but returned to 11
    m

    Michal Klimczak

    1 year ago
    Okay, I solved it. Turns out it messed up on
    androidTest/resources
    . Gradle sync actually issued a warning:
    Unable to build Kotlin project configuration
    org.gradle.api.InvalidUserDataException: Source directory '/Users/.../androidTest/resources/sample_book.xml' is not a directory.
    When I removed resources it started working fine. To fix the issue I changed
    resources
    to
    assets
    .
    rudolf.hladik

    rudolf.hladik

    1 year ago
    do you have
    android {
        configurations {
            create("androidTestApi")
            create("androidTestDebugApi")
            create("androidTestReleaseApi")
            create("testApi")
            create("testDebugApi")
            create("testReleaseApi")
        }
    }
    before
    kotlin {
      ...
    }
    it’s a bug https://youtrack.jetbrains.com/issue/KT-43944
    m

    Michal Klimczak

    1 year ago
    yes I do have that config