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)
CodePudding user response:
Clearing the temporary folder it will work
sudo rm -rf /tmp/*
Or you can increase available space in tmp by doing remount instead of "rm -rf" :
mount -o remount,size=8G,noatime /tmp
CodePudding user response:
I found that the main problem was that my computer had less disk space available. while the error says (OS: No space left on device, errno=28)
I just freed up some space on my disk and everything works fine.