I can only compile my code once

I have an arduino clone and am trying to learn how to use some sensors but am having trouble with the IDE. I can only compile or upload my code once, and then if I try to do it again it gives me this error messageArduino: 1.8.5 (Windows 10), Board: "Arduino/Genuino Uno"

C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\nicho\OneDrive\Documents\Arduino\libraries -fqbn=arduino:avr:uno -ide-version=10805 -build-path C:\Users\nicho\AppData\Local\Temp\arduino_build_653100 -warnings=default -build-cache C:\Users\nicho\AppData\Local\Temp\arduino_cache_128629 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.avrdude.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.arduinoOTA.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -prefs=runtime.tools.avr-gcc.path=C:\Program Files (x86)\Arduino\hardware\tools\avr -verbose C:\Users\nicho\OneDrive\Documents\Arduino\sketch_may05b\sketch_may05b.ino
readlink C:\Users\nicho\OneDrive\Documents\Arduino\sketch_may05b\sketch_may05b.ino: The system cannot find the file specified.

Error compiling for board Arduino/Genuino Uno.

I tried uninstalling the ide and then reinstalling it but it still does not work, I'm kind of new to electronics so if someone could help that would be great.

OneDrive problem.

really, how do i fix it. That would also explain why it works fine on my pc at home witch does not have onedrive

OneDrive problem.

how do i fix it.

Place files outside of OneDrive

There is a setting in OneDrive; something like 'files on demand' or so. You can search this forum or google it.

There is a bug report on gitHub and I think that it will be solved in the next version of the IDE.

oh, what i did was change the location of the sketchbook folder to downloads because that was not in one drive

If you do want to continue using the Arduino IDE with OneDrive, you may be interested to know that the bug has already been fixed in the beta build of the Arduino IDE, which you can download here:

but be aware that version of the Arduino IDE is primarily intended only for beta testing so you may have a higher chance of encountering bugs than you would using the production releases of the IDE.

To see details on the problem, steps that are being taken to fix it, and other possible workarounds that will allow you use the Arduino IDE with OneDrive, see: