Im on Windows, and a couple of times a month my co...
# compose
z
Im on Windows, and a couple of times a month my composables become unresolved like in the screenshot below. It doesnt happen to all of them, and sometimes I can even compile & run my projects. Its that time of month, and I thought Id at least ask here if anyone else runs into this every once in a while; and whether theres an open issue or workaround available? Ive tried invalidate caches, repair IDE, reboot, stare into the void, nothing seems to help - usually it sorts itself out after enough pain. Oh and this has only ever happened with composable functions, and when it happens it affects all my projects at the same time.
🥲 1
g
Have you ever tried clearing gradle's cache? Invalidating from the IDE does not do this
z
Do you mean deleting .gradle?
g
I get gradle weirdmess pretty frequently - the other day my caches somehow wound up in such a bad state after trying to copy a file that it'd instantly freeze the IDE the moment I opened it. Clearing all of gradle's cache fixed it.
Usually in your home folder there is a hidden gradle folder that has caches in it
eg; ~/.gradle/caches on macOS
z
I cant recall if Ive tried that, but will do next time this happens (it started working after I wrote this post 😅)
g
Note that clearing that will delete all of the cached downloads so you might be staring at a indexing bar for quite awhile after that.
z
But definitely feels cache related
As long as it works, Im ok with that 😄
g
Usually fixes my issue when gradle misbehaves. I haven't bothered to figure out what cache exactly in that folder is the culprit, I just know nuking the entire gradle cache usually fixes it.
z
Well I appreciate it, good to have a clear and concise thing I can try next time I run into it! Also curious if others are running into this.. probably worth filing a bug if thats the case 🙂
s
I had a very similar thing happen when I was on a flaky connection. Gradle cached a particular version of a library and every build using that version of that library would fail until I deleted the cache.
👍🏽 1