“未安装Flutter Code扩展名”但是已经安装好几个月了 [英] "Flutter Code extension not installed" but it's been installed for months

查看:79
本文介绍了“未安装Flutter Code扩展名”但是已经安装好几个月了的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

几个月来一直在Mac上使用Flutter和VSCode没问题,但是突然flutter医生产生了这个问题:

Have been using Flutter with VSCode on Mac for months without issues, but suddenly flutter doctor produces this:

[✓] Flutter (Channel beta, v0.5.1, on Mac OS X 10.13.4 17E202, locale en-US)
• Flutter version 0.5.1 at [Path]/flutter
• Framework revision c7ea3ca377 (3 weeks ago), 2018-05-29 21:07:33 +0200
• Engine revision 1ed25ca7b7
• Dart version 2.0.0-dev.58.0.flutter-f981f09760

[✓] Android toolchain - develop for Android devices (Android SDK 27.0.3)
• Android SDK at [Path]/Library/Android/sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-27, build-tools 27.0.3
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)
• All Android licenses accepted.

[✓] iOS toolchain - develop for iOS devices (Xcode 9.3.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 9.3.1, Build version 9E501
• ios-deploy 1.9.2
• CocoaPods version 1.5.2

[✓] Android Studio (version 3.1)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 25.0.1
• Dart plugin version 173.4700
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)

[!] VS Code (version 1.24.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension not installed; install from
  https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

[✓] Connected devices (1 available)
• Android SDK built for x86 • emulator-5554 • android-x86 • Android 9 (API 28) (emulator)

! Doctor found issues in 1 category.

我可以确认已安装颤振,自从我开始使用它以来,没有任何变化。另外,在我更新颤振(今天)之前,颤振医生在VSCode下读取为:

I can confirm that flutter is installed, and nothing has changed since I started using it. Additionally, before I updated flutter (today), flutter doctor read, under VSCode, as:

[!] VS Code (version 1.24.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Dart Code extension not installed; install from
  https://marketplace.visualstudio.com/items?itemName=Dart-Code.dart-code

但是,升级后似乎无法找到飞镖的问题可能已得到解决。

However, post-upgrade that seems the inability to find dart might have been fixed.

几天前有一篇帖子此处表示暂时不准确,因此我尝试运行该项目,并得到以下错误堆栈:

There is a post from a few days ago here that indicates flutter doctor may just be inaccurate for the time being, so I tried to run the project, and got the following error stack:

Using hardware rendering with device Android SDK built for x86. 
If you get graphics artifacts, consider enablingsoftware rendering with "--enable-software-rendering".
Launching lib/main.dart on Android SDK built for x86 in debug mode...
Initializing gradle...                                       2.0s
Resolving dependencies...                                    2.2s
Running 'gradlew assembleDebug'...
Error: unable to locate asset entry in pubspec.yaml: 
"ios/Flutter/flutter_assets/fonts/MyFlutterApp.ttf".
Error building assets

FAILURE: Build failed with an exception.

* Where:
Script 
'[Path]/flutter/packages/flutter_tools/gradle/flutter.gradle' line: 435

* What went wrong:
Execution failed for task ':app:flutterBuildDebug'.
> Process 'command 
'[Path]/flutter/bin/flutter'' finished with non-zero exit value 1
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

* Get more help at https://help.gradle.org

BUILD FAILED in 17s
Gradle build failed: 1
MacBook-Pro-3:rambleapp TrentKennelly$ flutter trace
Error connecting to observatory: Exception: Attempted to connect to Dart 
observatory 5 times, and all attempts failed. Giving up. The URL was 
ws://127.0.0.1:8100/ws

任何想法

推荐答案

VSCode中的一项更改使扩展检测失败。可以忽略此警告。

There was a change in VSCode that broke extensions detection. It's safe to ignore this warning.

有关此问题,请参阅Danny Tuppeny的完整评论这里

See the full comment of Danny Tuppeny, about this issue here.

对于stacktrace,有两件事:

For the stacktrace there are two things:


  • 资产 ios / Flutter / flutter_assets / fonts / MyFlutterApp.ttf 不是
    找到

  • 令人沮丧的问题

  • The asset "ios/Flutter/flutter_assets/fonts/MyFlutterApp.ttf"was not found
  • The issue with obsvervatory

您是否检查资产是否仍然存在?
没有它,该项目将无法编译,天文台问题可能与此有关。

Did you check the asset still exists? The project does not compile without it, and the observatory issue may be related to this.

这篇关于“未安装Flutter Code扩展名”但是已经安装好几个月了的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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