I use Arduino IDE 2.0.4 with a custom sketchbook location in OneDrive folder. For awhile after moving to new sketchbook location everything worked fine.
Today I suddenly cannot compile, because Arduino is not finding any of libraries that are in sketchbook folder. Library files are still there. Library Manager does not show them as installed. I have tried to install Arduino_DebugUtils. The library files where written to exactly the same location where they already existed and now IDE can find that library. See picture below.
It looks like some library index was lost. How can I restore my libraries without having to reinstall all of them? Why something like this could happen?
The only vaguely related thing I did, was change of color scheme in prefereneces... I have not installed new libraries or messed with any settings recently.
Have you checked that the library folder is also called "libraries" and that it has not been renamed? This must be inside the "Arduino" folder. If you don't have it in the cloud, this is usually saved under Documents. Maybe you just reinstall the app and move the "Arduino" folder with the sketches to the "Documents" path of Windows C:\Users\XXX\Documents\Arduino
I just saw that your path is called C:\Cloud\OneDrive\Projects\Arduino\XXX. I don't really want to know exactly, but your name is probably there somehow with XXX, isn't it? Isn't there another folder with "libraries"? For me it looks like this in the Windows documents path:
No, there are no non-latin chars in my name. Also, if it was issue with paths it would have never worked.
Note that if I (re)install a library from IDE UI it loads to exactly the same location where it was previously was and it finds it then.
It seems that IDE has library cache somewhere and it got broken or lost... but I did not find any mentions of such thing anywhere in the internet. Can this 'cache' rebuilt?
But in the libraries, i.e. in the old ones, is there something inside? Can you try to move it somewhere and then move it back? But I don't think that helps.