首页 > 解决方案 > globals.platform.environment['LOCALAPPDATA'] / FVM / Flutter

问题描述

当我fvm flutter doctor在 VSCode 中运行时,我收到此错误:

Building flutter tool...
../../../../../../fvm/versions/1.22.6/packages/flutter_tools/lib/src/android/android_studio.dart:379:37: Error: The argument type 'String?' can't be assigned to the parameter type 'String' because 'String?' is nullable and 'String' isn't.
        globals.platform.environment['LOCALAPPDATA'],

在 Android Studio 中使用相同的命令,我得到:

Building flutter tool...
Setting VM flags failed: Unrecognized flags: verbosity

我不知道如何解决这个问题。有人可以帮忙吗?

标签: flutterandroid-studiovisual-studio-codefvm

解决方案


据此

我对 IntelliJ 有同样的问题。要修复此移动到运行按钮旁边的框,然后单击它,选择编辑配置,然后禁用 VM 选项下方的检查模式,然后单击确定。

或者你可以看到这个页面


推荐阅读