title: getting this error: java.net.BindException: Address already in use: Cannot bind
body: <p>Hello am building a flutter apk using vscode but I get the error below, any help on how to go about it. Did a research but am getting no solution. I have configured JAVA_HOME well in gradle setting in android studio yet gradle am still getting the same error</p>
  <pre><code>FAILURE: Build failed with an exception.
  
  * What went wrong:
  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.5/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 -Xmx1536M -Dfile.encoding=windows-1252 -Duser.country=US -Duser.language=en -Duser.variant -cp C:\Users\cs\.gradle\wrapper\dists\gradle-6.5-all\2oz4ud9k3tuxjg84bbf55q0tn\gradle-6.5\lib\gradle-launcher-6.5.jar org.gradle.launcher.daemon.bootstrap.GradleDaemon 6.5
  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.&lt;init&gt;(FileLockCommunicator.java:51)
          at org.gradle.cache.internal.locklistener.DefaultFileLockContentionHandler.getCommunicator(DefaultFileLockContentionHandler.java:263)
          at org.gradle.cache.internal.locklistener.DefaultFileLockContentionHandler.reservePort(DefaultFileLockContentionHandler.java:255)
          at org.gradle.cache.internal.DefaultFileLockManager.lock(DefaultFileLockManager.java:108)
          at org.gradle.cache.internal.DefaultFileLockManager.lock(DefaultFileLockManager.java:95)
          at org.gradle.cache.internal.DefaultFileLockManager.lock(DefaultFileLockManager.java:90)
          at org.gradle.cache.internal.OnDemandFileAccess.updateFile(OnDemandFileAccess.java:51)
          at org.gradle.cache.internal.SimpleStateCache.update(SimpleStateCache.java:87)
          
      
      
      * 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
  </code></pre>