gpt4 book ai didi

intellij-idea - Intellij Flutter 为导入添加前缀

转载 作者:行者123 更新时间:2023-12-04 06:18:10 24 4
gpt4 key购买 nike

我已经安装了最新版本的 IntelliJ 和最新版本的 flutter 插件。但是当我为类似 List 触发代码完成(Command + Space)时,我看到这被添加到进口
import 'dart:core' as prefix0;
和我的 List变成
prefix0.List
我能做些什么来避免这个烦人的错误?

flutter 医生:

[✓] Flutter (Channel stable, v1.2.1, on Mac OS X 10.14.4 18E226, locale en-US)
• Flutter version 1.2.1 at /Users/sravindran/dev/flutter
• Framework revision 8661d8aecd (3 months ago), 2019-02-14 19:19:53 -0800
• Engine revision 3757390fa4
• Dart version 2.1.2 (build 2.1.2-dev.0.0 0a7dcf17eb)

[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
• Android SDK at /Users/sravindran/Library/Android/sdk
• Android NDK location not configured (optional; useful for native profiling support)
• Platform android-28, build-tools 28.0.3
• ANDROID_HOME = /Users/sravindran/Library/Android/sdk
• 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-1248-b01)
• All Android licenses accepted.

[✓] iOS toolchain - develop for iOS devices (Xcode 10.2.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 10.2.1, Build version 10E1001
• ios-deploy 1.9.4
• CocoaPods version 1.6.1

[✓] Android Studio (version 3.3)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 33.3.1
• Dart plugin version 182.5215
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)

[✓] IntelliJ IDEA Community Edition (version 2019.1.2)
• IntelliJ at /Applications/IntelliJ IDEA CE.app
• Flutter plugin version 35.3.3
• Dart plugin version 191.7141.49

[✓] VS Code (version 1.30.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 2.25.1

[!] Connected device
! No devices available

! Doctor found issues in 1 category.
Process finished with exit code 0

最佳答案

这有一个封闭的问题。 https://github.com/dart-lang/sdk/issues/36890

我猜这是按顺序执行某些操作时 SDK 中的错误。对我来说,重置计算机和 Visual Studio Code 可以解决导入问题。

关于intellij-idea - Intellij Flutter 为导入添加前缀,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56089045/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com