Closed Anirban2022 closed 11 months ago
I also ran into this problem, and it seems to be purely IDE-related. I wrote out some test code for the dropdown menu and was able to run the app. I also opened the project in Fleet (IDEA didn't support AGP) and got the same problem, so I think this is something to do with IntelliJ.
My thoughts are that it has something to do with the fact that DropdownMenu
(and DropdownMenuItem
) and AlertDialog
are both in files named *_androidKt
(AndroidAlertDialog_androidKt
and AndroidMenu_androidKt
respectively).
In the classes.jar
of androidx.compose.material3
, there are only 3 other files that end with _androidKt
, but they just contain internal variables. I tried a test to access them, and Android Studio did give me an error that it is "Internal to androidx.compose.material3
", so it is seeing these files to some extent. It seems to just be the Composable functions in files with these endings.
I just did some more tests, and I think it's just common code having this problem. I created a DropdownMenu without any trouble from the editor in androidMain (before it called common code). I also got editor autocomplete and no errors creating DropdownMenu
s in my iosMain and desktopMain Compose code.
These were just added in 1.5.0-beta02
Thanks for adding it. Tested working fine.
To be clear, I didn't add it. I'm just closely following progress of the project. Most of the changes are in compose-multiplatform-core.
Describe the bug AlertDialog and DropDownMenu missing material3 `
Affected platforms Select one of the platforms below:
Versions
To Reproduce Steps and/or the code snippet to reproduce the behavior:
Expected behavior should resolve.