gpt4 book ai didi

flutter - 收到此错误 : java.net.BindException:地址已在使用中:无法绑定(bind)

转载 作者:行者123 更新时间:2023-12-05 08:13:30 24 4
gpt4 key购买 nike

您好,我正在使用 vscode 构建一个 flutter apk,但我收到以下错误,请提供有关如何解决此问题的任何帮助。进行了研究,但没有找到解决方案。我已经在 android studio 的 gradle 设置中配置好 JAVA_HOME,但 gradle 仍然出现相同的错误

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.<init>(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

最佳答案

那是因为您在热点在设备中处于事件状态时开始调试您需要做的就是:

  1. 打开任务管理器alt+ctrl+delete
  2. 所有开放式 JDK 的结束任务
  3. 开启移动热点
  4. 再次开始调试
  5. 继续编码

关于flutter - 收到此错误 : java.net.BindException:地址已在使用中:无法绑定(bind),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/69568460/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com