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.
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.
You need to delete C:/Users/<YourUserName>/.gradle
completely, because the cache is probably corrupted and needs to be recreated.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With