-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Compose resources fail in Android Studio preview #4932
Comments
I'm pretty sure it is a duplicate of this |
@terrakok Looks similar. Would it be viable to change the ResourceReader interface and local composition to not be internal? Line 36 in fc90219
It's not a perfect solution, but would at least allow for customization when needed. |
How will it help you? |
In this case, it would help me get preview code working by allowing me to override it. My current solution is to expose my own composition local with my own version of the resource fetching methods, which ultimately call into the JB versions (or not). Beyond that, I think allowing for overrides of it does present some interesting opportunities, but they would all be niche use cases. I also admit, it would mean exposing the internals of resource storage, which may not be something the team wants to do. For example:
Both points can be done by just wrapping the API, but they are interesting use-cases, at least. |
Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks. |
This bug could be filed under a number of different trackers, it is filed on the google tracker as well.
Jetpack Compose version: 1.6.1
Jetpack Compose component(s) used:
com.android.compose.screenshot (alpha-1)
org.jetbrains.compose.components:components-resources
Android Studio Build: #AI-241.17011.79.2412.11910988
Kotlin version: 2.0.0
Steps to Reproduce or Code Sample to Reproduce:
The Android studio preview appears to fail utilizing string resources when in the following configuration:
Stack trace:
The text was updated successfully, but these errors were encountered: