https://kotlinlang.org logo
j

Jerry Yion

06/22/2023, 8:19 AM
hey, how can I access the files under the
resources
folder? I am running an intellij plugin demo. Its UI is built by Compose Desktop. Now I am trying to load a icon file under the
resources
folder into a Compose Image widget
Copy code
Image(
    painter = painterResource("chat.png"),
    contentDescription = null
)
but it reports error like below
Copy code
Resource chat.png not found
however, it works in the Compose Desktop project. I am so confused.
r

robercoding

06/23/2023, 5:49 AM
Maybe you need to use the slash previously? I have an
icons
folder under
resources
folder. And this is how it looks
j

Jerry Yion

06/23/2023, 5:59 AM
is it an intellij plugin project?
r

robercoding

06/23/2023, 6:08 AM
Yes!
j

Jerry Yion

06/25/2023, 1:30 AM
The root cause is ClassLoader…
😱 1
2 Views