<-- Back

Gradle build failure in Mendix Studio Pro: Could not update C:\Users\[username]\.gradle\caches\8.5\file-changes\last-build.bin

Issue

When attempting to run a project in Mendix Studio Pro, the following error message appears:

FAILURE: Build failed with an exception. * What went wrong: Could not update C:\Users\[username]\.gradle\caches\8.5\file-changes\last-build.bin > C:\Users\.gradle\caches\8.5\file-changes\last-build.bin (Access denied) * Try: > Run with --stacktrace option to get the stack trace. > Run with --debug option to get more log output. > Run with --scan to get full insights. > Get more help at https://help.gradle.org. BUILD FAILED in 641ms

This error also occurs without running when Gradle synchronization is enabled, preventing any code from being tested.

Environment

Studio Pro v10.24.1 and newer

Cause

The error is caused by a permission issue when Gradle attempts to access and update the last-build.bin file in the Gradle cache directory. This file is used by Gradle to track changes between builds, and the lack of access permissions is preventing the build process from completing successfully.

Solution / Workaround

Resolve this issue by deleting the corrupted cache file following these steps:

  1. Locate the file mentioned in the error message: C:\Users\[username]\.gradle\caches\8.5\file-changes\last-build.bin
  2. Delete the last-build.bin file.
  3. Run the project again in Mendix Studio Pro.

The last-build.bin file will be recreated automatically when Gradle runs again, resolving the permission issue.

Internal information related

264951

Additional information

Not Applicable

Have more questions? Submit a request

0 Comments

Article is closed for comments.

To provide feedback, please open a ticket here. Don't forget to include the article's URL along with the feedback you would like to provide.