Hello! I have a question but I was not sure which ...
# getting-started
v
Hello! I have a question but I was not sure which was the appropriate channel to post it. I have a multi-module project and I noticed that in some modules I can not use the
buildList
,
buildMap
, etc. due to
Unresolved reference
. In my gradle file I have added a stdlib dependency. So why does this happen? Does it need some extra configuration?
j
Are you somehow using an old version of Kotlin in those modules? Did you apply the Kotlin plugin? You shouldn't have to apply the stdlib dependency yourself, the plugin takes care of it
v
My gradle file looks like that
Copy code
plugins {
    kotlin("jvm")
}

dependencies {
    implementation("org.jetbrains.kotlin:kotlin-stdlib:1.6.21")
}
j
A couple questions: 1. Where is the version for the Kotlin JVM plugin defined? Which one is it? 2. Where are you getting the unresolved reference errors? In your main code or in your gradle build scripts?
v
1. Version is defined in the
gradle.properties
file. It is equals to '1.6.21' 2. I get the unresolved reference errors in my main code
j
It might be a silly question, but did you import those funtions in your main code?
Do you only have the error in the IDE? Or also when running Gradle from the command line?
v
Strange... But this seems to happen only in the IDE
l
Android Studio or IntelliJ? I’ve noticed Android Studio’s current version sometimes has issues with multi-module KMP projects.
v
Android studio 2021.2.1 Patch 1. It is a native android project