VSCODE,找不到抖动的SDK [英] VSCODE, Could not find a flutter SDK

查看:210
本文介绍了VSCODE,找不到抖动的SDK的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚尝试执行Flutter:New Project,但显示错误找不到flutter SDK。
我已经确保要完成Flutter Doctor的所有要求。

I just tried to execute Flutter:New Project, but it shows error could not find a flutter SDK. I've ensure to complete all of requirements from flutter doctor.

有什么方法可以解决此问题?

Is there any way to solve this problem ?

谢谢。

推荐答案

macOS 上,可以通过以下操作解决步骤。

On macOS this was solved by following these steps.

首先找到您在哪里下载了fld sdk(可以从此处)。除非您选择其他位置,否则它应该位于您的下载文件夹中。

First find where you downloaded the flutter sdk (Can be downloaded from here). It should be in your downloads folder unless you selected somewhere else.

下一步:


  1. 打开终端。运行以下命令:sudo nano / etc / paths

  2. 在出现提示时输入密码。

  3. 转到文件底部,然后输入您要添加的路径

  4. 按下control-x退出。

  5. 输入 Y以保存

  1. Open up Terminal. Run the following command: sudo nano /etc/paths
  2. Enter your password, when prompted.
  3. Go to the bottom of the file, and enter the path you wish to add.
  4. Hit control-x to quit.
  5. Enter "Y" to save the modified buffer.

如果将sdk下载到下载文件夹中,则要添加的路径应该为 /用户/您的用户名/下载/ flutter / bin

If the sdk is downloaded into your Downloads folder, your path to add should be /Users/yourusername/Downloads/flutter/bin

最后,退出并重新启动终端窗口和VS Code。重新启动后,两个应用程序均应识别出抖动,并且正在运行的Flutter Doctor现在应该可以工作。

Lastly, quit and restart your terminal windows and VS Code. After restarting, both apps should recognize flutter and running flutter doctor should now work.

这篇关于VSCODE,找不到抖动的SDK的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆