CommonMain classes are not accessible from android...
# multiplatform
u
CommonMain classes are not accessible from androidTest sourceSet while they are from iosTest. I am on kotlin 1.7.20 wit Android Studio Chipmunk. I see few references online of people reporting this and seems to be a bug of IDE/platform , how do you workaround this? See example -> IDatabaseRetriever is declared in commonMain
l
Do you have androidTest.dependsOn(commonTest)?
z
Can you check if this is the same in your project when using newer Android Studio versions? There are constant improvements to problems like this in new versions, especially for Kotlin Multiplatform where support is still quite early, it might be worth being even on betas or canaries. But at the very least, the latest stable version Dolphin would be worth upgrading to.
u
@Landry Norris it should not be needed but I tried anyway, no luck and IDE is still suggesting to make it dependant on commonMain
l
I haven’t had issues with Dolphin if that helps, but ymmv
u
I’ll give Dolphin a try and get back to you, thanks guys
yessss guys, it works, thank you!
c
yeah I had this same issue with Chipmunk, but not Bumblebee or Dolphin. Glad you got it resolved!