Closed yuroyami closed 5 months ago
I guess the problem is inside your resource file names. Could you provide a file name's list (e.g. with the tree tool):
> cd ./src/commonMain/resources
> tree
.
├── dir
│ └── img.png
└── img.webp
2 directories, 2 files
@terrakok The issue occurred again even when I had 1 resource (a single font Bahidj-Regular.ttf
).
Anyway, here's what I got:
mac@MACs-MacBook-Air MusicPlayerKMM % cd ./shared/src/commonMain/resources
mac@MACs-MacBook-Air resources % tree
.
├── assets
│ ├── daynight_toggle.json
│ ├── gesture_2_finger_drag.json
│ ├── gesture_double_tap.json
│ ├── gesture_horizontal_drag.json
│ ├── gesture_indicator_swipe_left.json
│ ├── gesture_indicator_swipe_right.json
│ ├── gesture_long_press.json
│ ├── gesture_pinch_in.json
│ ├── gesture_pinch_out.json
│ ├── gesture_swipe_right.json
│ ├── gesture_swipe_up.json
│ ├── gesture_tap.json
│ ├── onboarding_up_arrow.json
│ ├── permission.json
│ └── playing_waveform.json
└── composeRes
├── drawable
│ ├── default_art.png
│ ├── ic_track.png
│ ├── icon_cd_fill.xml
│ ├── icon_cd_outline.xml
│ ├── icon_musicnote_fill.xml
│ ├── icon_musicnote_outline.xml
│ ├── icon_star_fill.xml
│ ├── icon_star_outline.xml
│ ├── logo_day.png
│ ├── logo_night.png
│ ├── p2p_android.png
│ └── p2p_apple.png
└── font
├── Bahidj-Regular.ttf
├── Directive4-Regular.otf
└── Inter-Regular.otf
5 directories, 30 files
I am not knowledgeable when it comes to command lines, but doing cd ./src/commonMain/resources
in Android Studio's terminal echoes no such file or directory
.
If it reproduces in a simple project, could you share the project? It will help a lot!)
The new version was released. Feel free to reopen the issue if it reproduces again
Kotlin: 1.9.21 and 2.0.0-Beta1 Compose: 1.6.0-dev1350 and 1.6.0-dev1347
I have several projects where resource generation seems to be working fine (I put all my resources in a
composeRes
folder underresources
, each under their respective type, be it font drawable or values).But for this specific project, I am not sure whether this is an issue in my Android Studio (latest Hedgehog) or the compose plugin. But it seems that the plugin is never able to generate the resources in my project and it keeps creating a blank
Res.kt
with nothing in it, after throwing the following exception stacktrace (it's worth noting that Android Studio keeps complaining about my project having "duplicate content roots" on my resources folder, but I haven't declared my resources to be a content root anywhere, so I don't even know why it's doing that)I tried to create another compose multiplatform project using the wizard, and I copied the same resources to the new project as well as the same dependencies but no code literally, I kept the
build.gradle.kts
as is, I just copied the dependencies, but apparently the problem happened again. I am thinking maybe one of the dependencies is clashing with one another or something. Here's mybuild.gradle.kts
: