Flutter错误无法启动守护进程

问题描述 投票:0回答:1

我的flutter项目在旧笔记本电脑上运行顺利。但是,当我使用新笔记本电脑时,我的flutter项目无法在调试模式下运行。

此错误

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/5.6.2/userguide/gradle_daemon.html

Process command line: C:\Program Files (x86)\Java\jre1.8.0_221\bin\java.exe -Xmx1536M -Dfile.encoding=windows-1252 -Duser.country=US -Duser.language=en -Duser.variant -cp C:\Users\ajoris\.gradle\wrapper\dists\gradle-5.6.2-all\9st6wgf78h16so49nn74lgtbb\gradle-5.6.2\lib\gradle-launcher-5.6.2.jar org.gradle.launcher.daemon.bootstrap.GradleDaemon 5.6.2

Please read the following process output to find out more:

-----------------------

Error occurred during initialization of VM

Could not reserve enough space for 1572864KB object heap

Picked up JAVA_TOOL_OPTIONS: -Djava.vendor="Sun Microsystems Inc."


* 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.

new laptop的设置中是否缺少某些内容?我尝试clean projectupgrade flutter,但始终失败。对不起,新

flutter gradle build.gradle
1个回答
0
投票

我将使用的一般步骤是:

  1. 在终端中运行flutter doctor
  2. 如果使用模拟器,请确保它有足够的空间(通常需要重新启动才能清除连续部署时创建的垃圾文件)
  3. 如果gradle文件已被修改,建议使用Android Studio(应用程序的Android文件夹)打开它们。如果缺少任何内容,IDE会提示您安装缺少的依赖项。希望对您有所帮助
© www.soinside.com 2019 - 2024. All rights reserved.