Gradle Error: Path is not a readable directory for an Android Project saved in OneDrive

I had the same problem today:

Path "build/[package]/intermediaries/compiled_local_resources/debug/out" is not a readable directory.

I was able to fix this issue by deleting the .gradle and rebuilding the project.


I had the same issue, came out of no where and it really shouldn't make the build fail... but all I did was create the (empty) directory that it was looking for and it built fine afterwards.


In the end the only thing that worked for me was pushing the project up to a Git remote and cloning it from there into another (local) directory.

[not sure this counts as a solution but nothing else worked for me after a long agonising search so hopefully it helps someone]