Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Flutter Build Fails: Could Not Read Workspace Metadata from Gradle Cache

I'm trying to build a Flutter app in debug mode on a physical device, but the build fails with the following error: FAILURE: Build failed with an exception.

  • What went wrong: Multiple build operations failed. Could not read workspace metadata from C:\Users\USER.gradle\caches\8.10.2\transforms\7c689a5a75dba8db063ea504d8a8c22b\metadata.bin Could not read workspace metadata from C:\Users\USER.gradle\caches\8.10.2\transforms\25e07fe667eb3150ae55636163d489c1\metadata.bin ... (and many more similar errors). The error seems to be related to corrupted Gradle cache files. I've tried the following steps but the issue persists:

Ran flutter clean.

Deleted the global Gradle cache folder (C:\Users\USER.gradle\caches).

Ran flutter pub get to refresh dependencies.

Rebuilt the app using flutter run.

Despite these steps, the build still fails with the same errors.

like image 800
Danny Chanda Avatar asked Oct 19 '25 23:10

Danny Chanda


1 Answers

You need to delete C:/Users/<YourUserName>/.gradle completely, because the cache is probably corrupted and needs to be recreated.

like image 126
Henrique Vazquez Avatar answered Oct 22 '25 13:10

Henrique Vazquez



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!