我在网上找不到我的问题的答案。
我在试着安装颤振。因此,正如在https://flutter.dev/docs/get-started/install/linux中解释的那样(我使用的是Ubuntu,Linux),我安装了snap,然后是Android Studio和Visual Code。
这是flutter doctor的输出
$ flutter doctor
> Doctor summary (to see all details, run flutter doctor -v):
> [✓] Flutter (Channel stable, 1.20.2, on Linux, locale en_US.UTF-8)
>
> [✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
> [!] Android Studio (version 4.0)
> ✗ Flutter plugin not installed; this adds Flutter specific functionality.
> ✗ Dart plugin not installed; this adds Dart specific functionality.
> [!] Connected device
> ! No devices available
! Doctor found issues in 2 categories.因此,很明显已经正确安装了颤振(我不关心Android的依赖性,我想使用Visual )。
但是,在遵循https://flutter.dev/docs/get-started/editor?tab=vscode上的步骤之后,我遇到了一个问题。
我已经正确地安装了颤振扩展,但是当我运行Flutter: Run Flutter Doctor时,我得到了以下输出日志:
[11:32:22 PM] [General] [Info] Environment PATH:
[11:32:22 PM] [General] [Info] /home/adrien/.local/bin
[11:32:22 PM] [General] [Info] /usr/local/bin
[11:32:22 PM] [General] [Info] ...
[11:32:22 PM] [General] [Info] /snap/bin/flutter/bin
[11:32:22 PM] [General] [Info] Searching for flutter
[11:32:22 PM] [General] [Info] Looking for flutter in:
[11:32:22 PM] [General] [Info] /home/adrien/.local/bin
[11:32:22 PM] [General] [Info] /usr/local/bin
[11:32:22 PM] [General] [Info] ...
[11:32:22 PM] [General] [Info] .../bin
[11:32:22 PM] [General] [Info] /snap/bin/flutter/bin
[11:32:22 PM] [General] [Info] Found at:
[11:32:22 PM] [General] [Info] Candidate paths to be post-filtered:
[11:32:22 PM] [General] [Info] Returning SDK path undefined for flutter
[11:32:22 PM] [General] [Info] Searching for dart
[11:32:22 PM] [General] [Info] Looking for dart in:
[11:32:22 PM] [General] [Info] /home/adrien/.local/bin
[11:32:22 PM] [General] [Info] /usr/local/bin
[11:32:22 PM] [General] [Info] ...
[11:32:22 PM] [General] [Info] .../bin
[11:32:22 PM] [General] [Info] /snap/bin/flutter/bin
[11:32:22 PM] [General] [Info] Found at:
[11:32:22 PM] [General] [Info] Candidate paths to be post-filtered:
[11:32:22 PM] [General] [Info] Returning SDK path undefined for dart视觉代码找不到颤振(也不是Dart)。我试图重新启动Visual,但是没有什么改变。
顺便说一句,有一点我不明白。为什么dart不在我的电脑上?在这里,输出两个命令来查看它:
$ which flutter
> /snap/bin/flutter
$ which dart
>(达特什么也不回)
我确信这个问题是愚蠢的,但我不知道如何解决它!我希望你们中的一个能帮我。
谢谢
发布于 2020-08-15 06:34:24
打开颤振卡文件夹,看看你是否真的有/ snap /bin/ flutter /bin。它可能是安装在$HOME/snap/颤振/通用/颤振/垃圾桶中。
找到正确的文件夹后,将其添加到.profile或.bashrc文件中的路径:
颤振:$HOME/snap/颤振/普通/颤振/垃圾桶
Dart:$HOME/snap/flutter/common/flutter/bin/cache/dart-sdk/bin
发布于 2020-08-14 23:43:13
你更新路径了吗?尝试以sudo的形式运行VSCode
发布于 2020-08-15 11:17:53
尝尝这个,
https://www.techomoro.com/how-to-install-and-setup-flutter-on-ubuntu-18-04-1-lts-bionic-beaver/
如果您想要添加颤振路径,请按照步骤3.3,5而不是本博客中显示的路径添加您的颤振路径。
与所有ubuntu一起工作,linux versions.this为我工作,如果不让我知道的话
https://stackoverflow.com/questions/63420395
复制相似问题