-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't access exposed resource from core module (iOS) #4392
Comments
resources must be in the top level app module |
Does that means that is there no work around at all for project with feature modules? Essentially not being able to use the library at all? If so is there a rough estimate on when would that be possible? ( Just to decide if we can wait or we should pick another library) Also why does it works on Android builds? |
The first dev builds will be available soon but it will rtequire the kotlin gradle plugin 2.0+ It doesn't work as you expected on the android target. JVM ecosystem has binary for each module (jars) and it supports resources. Kotlin ecosystem doesn't have a resources support yet. |
问题:compose插件会根据CompseApp下/composeResources/里的文件生成Res类和Resource0类,但是在lib-module下iosApp使用会报错MissingResourceException。JetBrains/compose-multiplatform#4392 解决:暂时使用接口HDResProvider依赖注入ComposeApp生成的资源。同时引入ksp想通过ksp自动生成HDResProvider的实现类,避免手动注入。 2.引入voyager完成导航功能。 3.添加设备列表、添加设备页面。
Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks. |
Describe the bug
In order to bypass the current limitation of multi modules ntonotsupported, we add all the resources in a core module and then expose them through composable functions.
This works as expected on Android, but on iOS we get the exception:
org.jetbrains.compose.resources.MissingResourceException: Missing resource with path: values/strings.xml
Reproducer Project
Affected platforms
Versions
To Reproduce
Steps and/or the code snippet to reproduce the behavior:
Expected behavior
The app should not crash on iOS and the resource should be shown.
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Note that the reproducer project was created with the late wizard and was only modified to expose the resources from a resource module.
Running the android app does not have any issues
The text was updated successfully, but these errors were encountered: