Search code examples
androidflutterdartbuild.gradle

Flutter : BUILD FAILED in 11s Unhandled exception: FileSystemException: writeFrom failed


I'm new to flutter and mobile development. I was working on the app and everything was working fine. After a few hours I try to run my app on the device and I get the following error:

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'android'.
> Could not resolve all dependencies for configuration ':classpath'.
   > Problems writing to Binary store in /private/var/folders/k9/g_78rhy13m968yn0yg9v6jb40000gn/T/gradle16554077359029727541.bin (exist: true)

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --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 11s
Unhandled exception:
FileSystemException: writeFrom failed, path = '/var/folders/k9/g_78rhy13m968yn0yg9v6jb40000gn/T/flutter_tools.1owVKQ/flutter_tool.i2A2YL/app.dill' 
(OS Error: No space left on device, errno = 28)
#0      _RandomAccessFile.writeFrom.<anonymous closure> (dart:io/file_impl.dart:852:9)
<asynchronous suspension>
#1      _FileStreamConsumer.addStream.<anonymous closure>.<anonymous closure>.<anonymous closure> (dart:io/file_impl.dart:184:21)

<asynchronous suspension>
the Dart compiler exited unexpectedly.
Exception: Gradle task assembleDebug failed with exit code 1
Exited (sigterm)

Solution

  • I found that the main problem was my computer had less disk space available. that's why the error says (OS: No space left on device, errno=28)

    I just freed up some space on my disk and everything works fine.