You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Originally posted by nevrozza February 1, 2025
Hi! I program on a macbook, but now I've built a project for windows and now I don't have icons/images... (On other platforms (macOS, iOS, Android, WASM, JS) everything is OK).
/*"jar:file:/Users/nevrozq/Code/PansionApp/common/utils-compose/build/libs/utils-compose-jvm.jar!/composeResources/pansion/drawable/icons/screwdriver-wrench-solid.svg"*/val uri =Res.getUri("drawable/icons/${path}")
AsyncImage(
ImageRequest.Builder(LocalPlatformContext.current)
.data(uri)
.build(),
// other params
)
Throws:
java.lang.IllegalStateException: Unable to create a fetcher that supports: jar:file:/C:/Users/harla/OneDrive/Desktop/PansionApp/composeApp/build/compose/binaries/main-release/app/PansionApp/app/utils-compose-jvm-441ba4d5932399cabbfe401536893dcf.jar!/composeResources/pansion/drawable/icons/trophy-solid.svg
I guess the problem is that the project is multi-module and Res.getUri("drawable/icons/${path}") returns svg from a jar file. However, it still works on other platforms
Very important: If I use url link from internet or put path to picture (not in jar) it works...
So... There is a crutch solution!
Make a separate Windows-only folder with resources and transfer it simply as a string uri = "resources\\drawable\\icons\\${path}"...... But I still believe there is a better solution.
Thanks!
The text was updated successfully, but these errors were encountered:
Discussed in #2824
Originally posted by nevrozza February 1, 2025
Hi! I program on a macbook, but now I've built a project for windows and now I don't have icons/images... (On other platforms (macOS, iOS, Android, WASM, JS) everything is OK).
Throws:
I guess the problem is that the project is multi-module and
Res.getUri("drawable/icons/${path}")
returns svg from a jar file. However, it still works on other platformsVery important: If I use url link from internet or put path to picture (not in jar) it works...
So... There is a crutch solution!
Make a separate Windows-only folder with resources and transfer it simply as a string
uri = "resources\\drawable\\icons\\${path}"
...... But I still believe there is a better solution.Thanks!
The text was updated successfully, but these errors were encountered: