https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
r

ribesg

12/14/2023, 10:57 AM
Making a new KMP project since a long time, am I missing something new? Why is IntelliJ not seeing androidMain as a module here?
d

Djuro

12/14/2023, 10:58 AM
Use the wizard
🚫 1
s

Spoudel347

12/14/2023, 11:00 AM
Can't say much without looking at your source sets in
build.gradle
?
r

ribesg

12/14/2023, 11:01 AM
Pretty simple
Copy code
kotlin {

    jvmToolchain(17)

    // Targets

    androidTarget {
        publishAllLibraryVariants()
    }

    jvm()

}
s

Spoudel347

12/14/2023, 11:02 AM
and source sets? maybe it's just bugged out, did you do "clear cache and restart"?
r

ribesg

12/14/2023, 11:07 AM
I don't need additional sourceSet configuration, my setup is the default one, unless something changed
The project also seem to compile, but I don't have much in the androidMain src yet as IDEA basically treat my MainActivity file as a raw text file. I'll try making a basic activity by hand and launching it to check that it's really just IDEA
s

Spoudel347

12/14/2023, 11:09 AM
Do the
File>Invalid cache
, it should fix it.
android dance 1
o

Oleg Yukhnevich

12/14/2023, 11:15 AM
AFAIK, you need to enable Android plugin in IDEA
🤔 1
🧠 1
r

ribesg

12/14/2023, 11:16 AM
I invalidated cache, which didn't change anything but I had a new popup saying I might want to install the Android plugin. I didn't even know you could not have the Android plugin installed. Then, after installation and restart, it finally told me that AGP 8.2.0 was not supported. I enabled the experimental "use the godamn AGP version I give you anyway" option and it seems to work now. Thanks
😂 7
2 Views