FAILURE: Build failed with an exception.
- What went wrong:
java.io.UncheckedIOException: Could not move temporary workspace (C:UserssubugOneDriveDesktopReact CLI ProjectAwesomeProjectandroid.gradle8.6dependencies-accessors423f0288fa7dffe069445ffa4b72952b4629a15a-00f145fb-33a6-47aa-96fd-300b0f75f2e0) to immutable location (C:UserssubugOneDriveDesktopReact CLI ProjectAwesomeProjectandroid.gradle8.6dependencies-accessors423f0288fa7dffe069445ffa4b72952b4629a15a)
Could not move temporary workspace (C:UserssubugOneDriveDesktopReact CLI ProjectAwesomeProjectandroid.gradle8.6dependencies-accessors423f0288fa7dffe069445ffa4b72952b4629a15a-00f145fb-33a6-47aa-96fd-300b0f75f2e0) to immutable location (C:UserssubugOneDriveDesktopReact CLI ProjectAwesomeProjectandroid.gradle8.6dependencies-accessors423f0288fa7dffe069445ffa4b72952b4629a15a)
How to solve this exception.Give me an solution.
2
Answers
This could be because the project is nested within a OneDrive folder. Try moving the project to a folder that is not setup to sync/watch from OneDrive and attempt your build again.
The OneDrive folder is not "immutable" (meaning not changed by outside apps) since OneDrive may sync/change the files based off of cloud changes, which may be in conflict with your build process.
It is recommended that instead of using OneDrive as a "backup" for your project, to instead use git/GitHub or something similar as a code repository/backup for your files.
go to android folder and clean your gradle.
then run the server with clear cache flag.
if that still doesn’t work, try to update your sdk from Android Studio.