0

我尽我所能来更改 gradle 文件,但我仍然有这个错误,我无法运行新项目或旧项目。

错误:无法启动守护进程。此问题可能是由于守护程序配置不正确造成的。例如,使用了无法识别的 jvm 选项。请参阅 https://docs.gradle.org/4.1/userguide/gradle_daemon.html上有关守护进程的用户指南章节。请阅读以下进程输出以了解更多信息:

FAILURE:构建失败并出现异常。

  • 出了什么问题:无法使用 DaemonServices.createDaemonContext() 创建 DaemonContext 类型的服务。

  • 尝试:使用 --stacktrace 选项运行以获取堆栈跟踪。使用 --info 或 --debug 选项运行以获得更多日志输出。

  • 在https://help.gradle.org获得更多帮助

我在 win 10 (64 bit) 上使用 Android Studio 版本 3.0.0。distributionUrl=\ https://services.gradle.org/distributions/gradle-4.1-all.zip

输出

             2017-10-29 10:25:33,563 [ thread 92]   WARN - nal.AbstractExternalSystemTask - 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:
                -----------------------

                FAILURE: Build failed with an exception.

                * What went wrong: Could not create service of type DaemonContext using DaemonServices.createDaemonContext().

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

                * Get more help at https://help.gradle.org   com.intellij.openapi.externalSystem.model.ExternalSystemException: 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:
                -----------------------

                FAILURE: Build failed with an exception.

                * What went wrong: Could not create service of type DaemonContext using DaemonServices.createDaemonContext().

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

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

    at com.android.tools.idea.gradle.project.sync.idea.ProjectImportErrorHandler.getUserFriendlyError(ProjectImportErrorHandler.java:85)    
            at com.android.tools.idea.gradle.project.sync.idea.AndroidGradleProjectResolver.getUserFriendlyError(AndroidGradleProjectResolver.java:414) 
                at org.jetbrains.plugins.gradle.service.project.AbstractProjectResolverExtension.getUserFriendlyError(AbstractProjectResolverExtension.java:158) 
    at org.jetbrains.plugins.gradle.service.project.GradleProjectResolver$ProjectConnectionDataNodeFunction.fun(GradleProjectResolver.java:906) 
at org.jetbrains.plugins.gradle.service.project.GradleProjectResolver$ProjectConnectionDataNodeFunction.fun(GradleProjectResolver.java:886)     
      at org.jetbrains.plugins.gradle.service.execution.GradleExecutionHelper.execute(GradleExecutionHelper.java:218)   
     at org.jetbrains.plugins.gradle.service.project.GradleProjectResolver.resolveProjectInfo(GradleProjectResolver.java:139)   
     at org.jetbrains.plugins.gradle.service.project.GradleProjectResolver.resolveProjectInfo(GradleProjectResolver.java:79)    
       at com.intellij.openapi.externalSystem.service.remote.RemoteExternalSystemProjectResolverImpl.lambda$resolveProjectInfo$0(RemoteExternalSystemProjectResolverImpl.java:37) 
 at com.intellij.openapi.externalSystem.service.remote.AbstractRemoteExternalSystemService.execute(AbstractRemoteExternalSystemService.java:59) 
    at com.intellij.openapi.externalSystem.service.remote.RemoteExternalSystemProjectResolverImpl.resolveProjectInfo(RemoteExternalSystemProjectResolverImpl.java:37)   at com.intellij.openapi.externalSystem.service.remote.wrapper.ExternalSystemProjectResolverWrapper.resolveProjectInfo(ExternalSystemProjectResolverWrapper.java:45)     at com.intellij.openapi.externalSystem.service.internal.ExternalSystemResolveProjectTask.doExecute(ExternalSystemResolveProjectTask.java:66)    
  at com.intellij.openapi.externalSystem.service.internal.AbstractExternalSystemTask.execute(AbstractExternalSystemTask.java:139)   
 at com.intellij.openapi.externalSystem.service.internal.AbstractExternalSystemTask.execute(AbstractExternalSystemTask.java:125) 
        at com.intellij.openapi.externalSystem.util.ExternalSystemUtil$3.execute(ExternalSystemUtil.java:388)   
        at com.intellij.openapi.externalSystem.util.ExternalSystemUtil$5.run(ExternalSystemUtil.java:445)   
        at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:726) 
            at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$1(CoreProgressManager.java:176)     
        at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:556)     
        at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:501) 
            at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:66) 
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:163)  
        at com.intellij.openapi.progress.impl.ProgressManagerImpl$1.run(ProgressManagerImpl.java:137)   
        at com.intellij.openapi.application.impl.ApplicationImpl$2.run(ApplicationImpl.java:334) 
        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.1/userguide/gradle_daemon.html
4

0 回答 0