Hey !! facing issues accessing resource using the ...
# compose
k
Hey !! facing issues accessing resource using the new resource method introduced in compose 1.6.0-beta01. I have added a reproducer in the issue section. https://github.com/JetBrains/compose-multiplatform/issues/4189
CC: @Konstantin Tskhovrebov
k
I don't see resources in your sample
k
@Konstantin Tskhovrebov i am sorry i somehow missed adding them to git i have updated the sample
k
apply the compose plugin after the android https://github.com/Kashif-E/KMPMovies/blob/d389251c26d99591b94048d6568276ca1a61ac7d/MoviesApp/build.gradle.kts#L8 it was fixed already and will be published soon
👍 1
k
Thanks @Konstantin Tskhovrebov
@Konstantin Tskhovrebov .ttf fonts are not working
k
check your fonts. it should work
k
thanks for this @Konstantin Tskhovrebov i tried adding ttf and its working now. i might have been doing something wrong
c
wait. applying plugins in a different order can have an effect on my code. Should i generally always apply android after compose?
k
no, generally it doesn't matter. it was a bug
🎉 1
@Kashismails could you update your article about fonts? https://proandroiddev.com/how-to-use-resources-in-compose-multiplatform-77a6552b505d
k
i have updated it already @Konstantin Tskhovrebov
K 1
👍 1
k
image.png
k
fixed @Konstantin Tskhovrebov sorry for missing this
k
all other problems should be resolved in 1.6.0-beta02
K 2
s
Thanks for the article. With 1.6.0-beta02 does it support multi module project ? I tried testing it. It worked well for android and dekstop but not for web and iOS. Does it need any additional setup than mentioned in the above article ? @Konstantin Tskhovrebov @Kashismails
k
not yet
we will publish the documentation soon. wait it a bit, please
K 2
s
Sure thing. Thank you 🙂
I am getting these in console when run on web/wasmJs and on iOS. On android and desktop the same code runs fine. I am trying to use a drawable resource from composeResources folder. @Konstantin Tskhovrebov Please let me know if there is any update on documentation here. I have a multi module setup.
Okay understood that multi module support has not arrived. Would like know when would this be released/supported :)
a
For some reason I can’t find, the fonts are working fine for all targets but Android. On Android I get this error:
 Caused by: java.lang.IllegalStateException: Unable to load font Font(assetManager, path=font/anta_regular.ttf, weight=FontWeight(weight=400), style=Normal)
I’m using RC02
ok, it was the order of the plugins. Thought it would be fixed by RC02
👍 2
179 Views