I'm getting a PathAccessException when I try to debug my app.

Hi all!

I’m actually using VS Code linked with LDPlayer as the mobile app emulator.

In my flutter app, I added in the assets folder another folder where I’m stocking some images. But I’m often getting this error:

I don’t understand why I’m getting this error. I tried to move the project away from my OneDrive but it did not work. I can only build my app when I change the name of the files which are getting this error, but it always getting this error after a while.

Let’s hope someone could find the answer to my problem. Thanks in advance! :slight_smile: :+1:

Delete OneDrive. It’s a cancer. If you really need that storage, set your OneDrive for a folder somewhere and ask it to not save any folder you work on (including desktop). Use github for “backup”.

That being said, there is some tools you can use to check what is locking that file:

Check who is locking the file and delete the bastard (99% sure it’s OneDrive or the Sieve Defender (a.k.a. MS Defender))

Thanks a bunch! I made a reboot and it removed the error, but I know that I will encounter it again soon. I tried Handle but it does not seem to work on my PC. I did not troubleshoot it at all, I downloaded the other one you suggested (ProcessExplorer). I will definitely use it.

I always search for solutions but I never think about tools. Anyway thanks again! :slight_smile: