【发布时间】:2018-12-21 23:12:54
【问题描述】:
我是一名 Android 开发人员。 昨天我在 Android Studio 打开了我当前的项目 并且项目无法启动。
显示错误:
Gradle sync failed: 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 guide chapter on the daemon at https://docs.gradle.org/4.4/userguide/gradle_daemon.html
Please read the following process output to find out more:
-----------------------
Consult IDE log for more details (Help | Show Log) (4s 245ms)
- 我已经将
graddle.properties编辑为org.gradle.jvmargs=-Xmx1024m,但还是不行 - 我已经用它的 gradle 重新安装了我的 android studio,但这个错误仍然存在
- 我已经删除了我电脑上的
.gradle文件夹,但它仍然卡住了 - 我已经在 Android Studio 中设置了构建进程堆大小,但仍然无法正常工作
- 我已经检查了我的防病毒软件和防火墙(甚至将其关闭),但没有任何反应
我需要帮助,因为我根本无法运行我的项目。
这里是 gradle 日志:
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.gradle.api.GradleException: 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 guide chapter on the daemon at
https://docs.gradle.org/4.4/userguide/gradle_daemon.html
Please read the following process output to find out more:
这是来自守护进程日志的日志
20:37:16.805 [DEBUG] [org.gradle.internal.remote.internal.inet.InetAddresses] Adding loopback multicast interface Microsoft Wi-Fi Direct Virtual Adapter-QoS Packet Scheduler-0000
20:37:16.805 [DEBUG] [org.gradle.internal.remote.internal.inet.InetAddresses] Adding IP addresses for network interface Microsoft Wi-Fi Direct Virtual Adapter-WFP 802.3 MAC Layer LightWeight Filter-0000
20:37:16.806 [DEBUG] [org.gradle.internal.remote.internal.inet.InetAddresses] Is this a loopback interface? false
20:37:16.808 [DEBUG] [org.gradle.internal.remote.internal.inet.InetAddresses] Is this a multicast interface? true
20:37:16.808 [DEBUG] [org.gradle.internal.remote.internal.inet.InetAddresses] Adding loopback multicast interface Microsoft Wi-Fi Direct Virtual Adapter-WFP 802.3 MAC Layer LightWeight Filter-0000
20:37:16.814 [ERROR] [system.err]
20:37:16.814 [ERROR] [system.err] FAILURE: Build failed with an exception.
20:37:16.815 [ERROR] [system.err]
20:37:16.815 [ERROR] [system.err] * What went wrong:
20:37:16.815 [ERROR] [system.err] java.net.BindException: Address already in use: bind
20:37:16.815 [ERROR] [system.err]
20:37:16.815 [ERROR] [system.err] * Try:
20:37:16.815 [ERROR] [system.err] 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.
20:37:16.816 [ERROR] [system.err]
20:37:16.816 [ERROR] [system.err] * Get more help at https://help.gradle.org
Daemon vm is shutting down... The daemon has exited normally or was
terminated in response to a user interrupt.
【问题讨论】:
-
经过一番挣扎和困惑,我发现了一个问题。似乎我的 Windows 更新做了一些让守护进程停止其进程的事情。所以 Aftare 试图将我的窗口恢复到一个珍贵的状态(大约 2 天前),似乎这个过程恢复了正常。
-
将来,考虑在 Gradle 论坛上交叉发帖。他们在那里很有帮助。
-
昨天已经试过了,但没有人回应..所以我把问题放在这里
标签: android android-studio gradle daemon