Fix: React Native Error : UncheckedIOException: Could not move temporary workspace

Error trace:
java.io.UncheckedIOException: Could not move temporary workspace

 (C:\Users\dev\..\android.gradle\8.6\dependencies-accessors\...) 
 
to immutable location (D:\android.gradle\8.6\dependencies-accessors\...)

Reason for the error:

The above error is related to the Android Gradle build process in your React Native project. The error message indicates that there was an issue moving a temporary workspace to an immutable location.


Solution(s):

The first thing that you should try is to clean and rebuild your project.

cd android
gradlew clean
gradlew assembleRelease

If that does not work you can try to update your gradle.

If not working again, it may be an issue with the Gradle version you are using, just change your Gradle from 8.6 to 8.5 and check if that works.

Comments & Discussion

Facing issues? Have questions? Post them here! We're happy to help!