Flutter报错无法启动守护进程

Ber*_*ris 16 gradle build.gradle flutter

我的 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.
Run Code Online (Sandbox Code Playgroud)

我的设置中是否缺少某些内容new laptop?我尝试过clean project,upgrade flutter但总是失败。抱歉新的

Naj*_*qib 16

对我来说真正有用的是,在 Windows 10 中,只需关闭移动热点并再次运行该应用程序即可。我认为这是 Windows 10 中的一个故障/错误。


小智 7

此问题的解决方案是在运行构建或应用程序编译之前停用 Windows 热点。

不要删除任何内容或文件,只需在关闭移动热点的情况下构建应用程序即可。

这是 Windows 10 的一个错误,无任何原因地启动。我刷新了我的窗户,这开始了

Flutter 或 Android 应用程序


Jus*_*son 2

所以我只是在我这边解决这个问题。我看不到任何设备,当启动 VS code 时,它​​会警告我,并弹出“Flutter 错误无法启动守护进程进程”,其下方表示是 dart 导致了错误。

我 cd 到使用稳定存储库的 flutter 包,我执行了 git fetch。然后转到我的项目并运行 flutter pub get。我关闭并打开了该项目,现在我看到了设备,并且没有出现小狗警告。我确实看到弹出“dart 已更新”消息。