Anyone else get this? It compiles just fine and ru...
# compose-desktop
a
Anyone else get this? It compiles just fine and runs, but the IDE doesn't seem to know about
AlertDialog
d
The AlertDialog method is not available in the common source set. You can use it in android and jvm, but they have different arguments, use expect actual if you need it in common
a
huh, does it work in Compose Desktop though?
d
It does when you run, because the method exists on jvm and it compiles only the required platform, using make it will print an error
a
I find it strange that it even compiles in
commonMain
then, especially if the Android & Desktop variants even have different call signatures
d
It works because you didn't use the platform specific arguments, since they have default values, it compiles with no error
For now you can use expect/actual and just create it yourself, by using the default values. I did it in my project to support material3