Unable to start the daemon process

android studio 报错

Error: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.1/userguide/gradle_daemon.html
Please read the following process output to find out more:
-----------------------

使用命令行执行 报错如下

radle tasks --stacktrace

FAILURE: Build failed with an exception.

* What went wrong:
java.net.SocketException: Bad address: Cannot bind

* Try:
Run with --info or --debug option to get more log output.

* Exception is:
org.gradle.api.UncheckedIOException: java.net.SocketException: Bad address: Cannot bind
        at org.gradle.internal.UncheckedException.throwAsUncheckedException(UncheckedException.java:57)
        at org.gradle.internal.UncheckedException.throwAsUncheckedException(UncheckedException.java:40)
        at org.gradle.cache.internal.FileLockCommunicator.(FileLockCommunicator.java:49)
        at org.gradle.cache.internal.locklistener.DefaultFileLockContentionHandler.getCommunicator(DefaultFileLockContentionHandler.java:153)
        at org.gradle.cache.internal.locklistener.DefaultFileLockContentionHandler.reservePort(DefaultFileLockContentionHandler.java:145)
        at org.gradle.cache.internal.DefaultFileLockManager.lock(DefaultFileLockManager.java:91)
        at org.gradle.cache.internal.DefaultFileLockManager.lock(DefaultFileLockManager.java:79)
        at org.gradle.cache.internal.OnDemandFileAccess.readFile(OnDemandFileAccess.java:36)
        at org.gradle.cache.internal.SimpleStateCache.get(SimpleStateCache.java:47)
        at org.gradle.cache.internal.FileIntegrityViolationSuppressingPersistentStateCacheDecorator.get(FileIntegrityViolationSuppressingPersistentStateCacheDecorator.java:32)
        at org.gradle.launcher.daemon.registry.PersistentDaemonRegistry.getAll(PersistentDaemonRegistry.java:69)
        at org.gradle.launcher.daemon.client.DefaultDaemonConnector.connect(DefaultDaemonConnector.java:109)
        at org.gradle.launcher.daemon.client.DaemonClient.execute(DaemonClient.java:138)
        at org.gradle.launcher.daemon.client.DaemonClient.execute(DaemonClient.java:92)
        at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:51)
        at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:173)
        at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:287)
        at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:260)
        at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:33)
        at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:24)
        at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33)
        at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22)
        at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:253)
        at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:182)
        at org.gradle.launcher.Main.doAction(Main.java:33)
        at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:60)
        at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:37)
        at org.gradle.launcher.GradleMain.main(GradleMain.java:23)
Caused by: java.net.SocketException: Bad address: Cannot bind
        at java.net.DualStackPlainDatagramSocketImpl.socketBind(Native Method)
        at java.net.DualStackPlainDatagramSocketImpl.bind0(DualStackPlainDatagramSocketImpl.java:84)
        at java.net.AbstractPlainDatagramSocketImpl.bind(AbstractPlainDatagramSocketImpl.java:93)
        at java.net.DatagramSocket.bind(DatagramSocket.java:392)
        at java.net.DatagramSocket.(DatagramSocket.java:242)
        at java.net.DatagramSocket.(DatagramSocket.java:299)
        at org.gradle.cache.internal.FileLockCommunicator.(FileLockCommunicator.java:47)
        ... 30 more


* Get more help at https://help.gradle.org

解决
http://forum.cocos.com/t/cocos2dx3-16-android-studio2-3-3-android-gradle/54281
解决了! 命令行输入 netsh winsock reset 然后重启就可以了
通过命令行找答案 准确

你可能感兴趣的:(Unable to start the daemon process)