Reputation: 25
Launching lib\main.dart on sdk gphone x86 in debug mode... Running Gradle task 'assembleDebug'...
FAILURE: Build failed with an exception.
Unable to start the daemon process.
This problem might be caused by incorrect configuration of the daemon.
For example, an unrecognized jvm option is used.
Please refer to the User Manual chapter on the daemon at https://docs.gradle.org/6.7/userguide/gradle_daemon.html
Process command line: C:\Program Files\Android\Android Studio\jre\bin\java.exe --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.lang.invoke=ALL-UNNAMED --add-opens java.prefs/java.util.prefs=ALL-UNNAMED -Xmx1G -Dfile.encoding=windows-1252 -Duser.country=US -Duser.language=en -Duser.variant -cp C:\Users\ilapa\.gradle\wrapper\dists\gradle-6.7-all\cuy9mc7upwgwgeb72wkcrupxe\gradle-6.7\lib\gradle-launcher-6.7.jar org.gradle.launcher.daemon.bootstrap.GradleDaemon 6.7
Please read the following process output to find out more:
-----------------------
FAILURE: Build failed with an exception.
* What went wrong:
java.net.BindException: Address already in use: Cannot bind
* Try:
Run with --info or --debug option to get more log output. Run with --scan to get full insights.```
```* Exception is:
org.gradle.api.UncheckedIOException: java.net.BindException: Address already in use: Cannot bind
at org.gradle.internal.UncheckedException.throwAsUncheckedException(UncheckedException.java:61)
at org.gradle.internal.UncheckedException.throwAsUncheckedException(UncheckedException.java:41)
at org.gradle.cache.internal.locklistener.FileLockCommunicator.<init>(FileLockCommunicator.java:51)
at java.base/java.net.DualStackPlainDatagramSocketImpl.socketBind(Native Method)
at java.base/java.net.DualStackPlainDatagramSocketImpl.bind0(DualStackPlainDatagramSocketImpl.java:84)
at java.base/java.net.AbstractPlainDatagramSocketImpl.bind(AbstractPlainDatagramSocketImpl.java:131)
at java.base/java.net.DatagramSocket.bind(DatagramSocket.java:394)
at java.base/java.net.DatagramSocket.<init>(DatagramSocket.java:244)
at java.base/java.net.DatagramSocket.<init>(DatagramSocket.java:301)
at org.gradle.cache.internal.locklistener.FileLockCommunicator.<init>(FileLockCommunicator.java:49)
... 22 more
Get more help at https://help.gradle.org
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 Exception: Gradle task assembleDebug failed with exit code 1
Upvotes: 1
Views: 1065
Reputation: 2512
First you can try Deleting your .gradle file
its usually located at %USER%/.gradle
then you add this line to .gradle/gradle.properties
org.gradle.jvmargs=-Xmx1536m
Disabling the firewall (although i allow the ide access) and doing this fixed the issue for me.
Upvotes: 1