I’m getting into Compose Multiplatform and tacklin...
# android-studio
m
I’m getting into Compose Multiplatform and tackling resources at the moment. I have a
composeResources
folder under
commonMain
but it doesn’t show up in the Android project pane? Is that a known issue? Also,
Find Usages
does not work for strings in that folder. Android Studio Meerkat Feature Drop | 2024.3.2
c
To my knowledge we haven’t done any work on the Android view to support KMP/CMP projects, so YMMV
m
I guess part of the confusion is that commonMain itself shows along with first-class support for the kotlin files in that source. I have to switch to Project view to see the composeResources. But more annoyingly is that Find Usages (for the string resources) does not work in that case.
z
Navigating to declaration and finding usages for CMP string resources works with the new KMP tooling, which we announced here last week (and a stable channel release is coming soon so you don't need to install it so manually).
thank you color 1
As for the Android view: genuinely curious, why do you use that over the Project view in general? And yes, it's not optimized for KMP at all. It also shows all possible source sets that you might want to create and use, for example, which is a lot of noise.
m
Primarily out of habit. I’m migrating a large Android app and just using stubs for nativeMain code for now since my current focus is to bring as much into commonMain as possible. Project view generally has a load of unnecessary entries like build. Having said that, in Android view, kmp modules also have a load of stuff I’d like to hide (like you mention), so I’m choosing the lesser of two evils. Would like to know if it’s possible to hide a load of those folders like iosSimulator*
Looking more into the Project view, I don’t like how you don’t get a flat list of the modules. I have about 30 which are arranged in a hierarchy in the filesystem, so I don’t want to see them in that way
z
@Chris Sinco [G] Can you take the feedback about • CMP resource folders missing (heads up: they can exist for any source set, and their location/name can be customized) • Too many source sets displayed (I'd just hide empty ones for KMP projects, definitely not show all test and leaf folders) ... and convert it into issues on the AS side from here?
c
I can but easier to coordinate with @Matt Dyor first
👍 1
m
In terms of the project view, I find this is helpful: https://plugins.jetbrains.com/plugin/25442-kmp-project-view