I’m having issues where Android Studio no longer s...
# multiplatform
c
I’m having issues where Android Studio no longer sees classes declared in AndroidMain sourceSet from the androidApp module. I have
Copy code
implementation(project(":shared"))
at the top of my Android
build.gradle.kts
file’s dependencies list. The project builds and runs fine, but I get syntax errors in the IDE, Problems pane, and when I try to commit it warns me about all of the fake errors in changed files. This started when I first upgraded to Bumblebee. The same issues do not occur with any code referenced from commonMain. Does anyone have any ideas how I can resolve this?
j
Kotlin version?
c
1.6.10
Also, the problems don’t seem to go away when I move to Chipmunk.
j
Do you have
kotlin.mpp.enableGranularSourceSetsMetadata=true
?
c
Yes, in gradle.properties.
Copy code
#Gradle
org.gradle.jvmargs=-Xmx2048M -Dkotlin.daemon.jvm.options\="-Xmx2048M"

#iOS
xcodeproj=./iosApp

#Kotlin
kotlin.code.style=official
kotlin.mpp.stability.nowarn=true
kotlin.mpp.enableCInteropCommonization=true
kotlin.mpp.enableGranularSourceSetsMetadata=true
kotlin.native.enableDependencyPropagation=false

#Android
android.useAndroidX=true
I don’t know what to make of this, but the problem seems to disappear in Android Studio Dolphin/Canary.
j
I had issues with it, try to remove an invalidate caches
m
Something that worked for me a while back is to remove the .idea folder and reimport the project