I want to use Yaml in my multiplaform project. I f...
# multiplatform
c
I want to use Yaml in my multiplaform project. I found a package and added it to my project, and the code runs but the syntax highlighting says it's broken. I assume this means it's not compatible with multiplatform. How can I find a YAML package which is compatible with multiplatform, or fix this one so it works?
c
find a lib that targets your targets https://klibs.io/?query=yaml
c
Okay, but it looks like it does target my targets.
c
then your setup is wrong
c
I added the implementation to the commonMain dependencies. Did I need to do more than that?
c
no, that should be fine. 1. did you do a gradle sync? 2. did you try to compile to rule put IDE glitch?
c
I've done multiple gradle syncs. I've only been running the code, which I sort of assumed meant it would compile in the background. Is there a separate step that does something different?
c
only been running the code
running how? and does it run?
c
Shift-F10 in Android Studio?
It launches the app, loads the YAML, parses the data, and displays it to the screen.
The library is fully working as expected, but the IDE tells me the code doesn't compile. Except the code does compile.
c
then its just a AS glitch not getting the classpath correct. just do the usual “switch off and on againg”, clear gradle caches, also I think AS has something like “Repair IDE” or “invalidated caches”
c
Ah, that seemed to fix it. Super annoying.
Thanks for the help.
Now to figure out why I can't get tests working ...