Dart 3 语法在 Android Studio 上不受支持。

huangapple go评论74阅读模式
英文:

Dart 3 syntax is not supported on Android Studio

问题

Here's the translation of the provided content:

Android Studio Data:

Android Studio Bumblebee | 2021.1.1 补丁 1
构建 #AI-211.7628.21.2111.8139111,构建于 2022 年 2 月 1 日
运行时版本:11.0.11+9-b60-7590822 amd64
VM:由 Oracle Corporation 提供的 OpenJDK 64 位服务器 VM
Windows 10 10.0
GC:G1 年轻代,G1 旧代
内存:1280M
核心:6
注册表:external.system.auto.import.disabled=true

非捆绑插件:
批处理脚本支持 (1.0.13), CMD 支持 (1.0.5), 统计 (4.1.10), com.gionchat (1.3.5), com.bloc.intellij_generator_plugin (3.4.0), com.herbert.george.dart.extensions (0.0.1+3), com.herbert.george.flutter-snippets (2.1.1-stable-1), com.mallowigi (36.0), de.tyxar.clean_architecture_plugin (1.1.0), idea.plugin.protoeditor (2.3.1), com.almightyalpaca.intellij.plugins.discord (1.10.0), Dart (211.7817), com.ixigua.flutter_asset_iteral (1.7.7), com.localizely.flutter-intl (1.18.2-2020.3), com.shenyong.flutter.refgenerator (1.2.221), org.jetbrains.kotlin (211-1.6.21-release-334-AS7442.40), io.flutter (71.2.1), pl.pszklarska.pubversionchecker (1.3.5), org.intellij.plugins.markdown (211.7142.37)

Flutter Doctor 日志


[√] Flutter (通道 master, 3.12.0-3.0.pre.67, 在 Microsoft Windows [版本 10.0.19045.2965] 上,区域设置为 en-US)
[√] Windows 版本 (已安装的 Windows 版本为 10 或更高版本)
[√] Android 工具链 - 用于 Android 设备的开发 (Android SDK 版本 32.1.0-rc1)
[√] Chrome - 用于 Web 开发
[√] Visual Studio - 用于 Windows 应用程序开发 (Visual Studio Community 2022 17.4.3)
[√] Android Studio (版本 2021.1)
[√] Android Studio (版本 2021.3)
[√] Android Studio (版本 2022.1)
[√] IntelliJ IDEA Community Edition (版本 2022.2)
[√] VS Code (版本 1.79.0)
[√] 已连接设备 (3 台可用)
[√] 网络资源

Flutter 升级结果:

从 Flutter 引擎 effea50196ca4ee957b24d37c3e6766654bde549 下载 Dart SDK...
展开已下载的存档...
构建 flutter 工具...
运行 pub upgrade...
解析依赖项... (5.9 秒)
已获取依赖项。
Flutter 已经是通道 master 的最新版本
Flutter 3.12.0-3.0.pre.67 • 通道 master • https://github.com/flutter/flutter.git
框架 • 版本 4f94dee851 (83 分钟前) • 2023-06-12 01:57:26 -0400
引擎 • 版本 effea50196
工具 • Dart 3.1.0 (构建 3.1.0-197.0.dev) • DevTools 2.24.0

英文:

How do I fix Android Studio not doing Code Suggestions, Syntax Highlighting or any of the Dart Plugin expected functionality when I write Dart 3 code?

Android Studio Data:

Android Studio Bumblebee | 2021.1.1 Patch 1
Build #AI-211.7628.21.2111.8139111, built on February 1, 2022
Runtime version: 11.0.11+9-b60-7590822 amd64
VM: OpenJDK 64-Bit Server VM by Oracle Corporation
Windows 10 10.0
GC: G1 Young Generation, G1 Old Generation
Memory: 1280M
Cores: 6
Registry: external.system.auto.import.disabled=true

Non-Bundled Plugins:
Batch Scripts Support (1.0.13), CMD Support (1.0.5), Statistic (4.1.10), com.gionchat (1.3.5), com.bloc.intellij_generator_plugin (3.4.0), com.herbert.george.dart.extensions (0.0.1+3), com.herbert.george.flutter-snippets (2.1.1-stable-1), com.mallowigi (36.0), de.tyxar.clean_architecture_plugin (1.1.0), idea.plugin.protoeditor (2.3.1), com.almightyalpaca.intellij.plugins.discord (1.10.0), Dart (211.7817), com.ixigua.flutter_asset_iteral (1.7.7), com.localizely.flutter-intl (1.18.2-2020.3), com.shenyong.flutter.refgenerator (1.2.221), org.jetbrains.kotlin (211-1.6.21-release-334-AS7442.40), io.flutter (71.2.1), pl.pszklarska.pubversionchecker (1.3.5), org.intellij.plugins.markdown (211.7142.37)

Flutter Doctor Logs


    [√] Flutter (Channel master, 3.12.0-3.0.pre.67, on Microsoft Windows [Version 10.0.19045.2965], locale en-US)
    [√] Windows Version (Installed version of Windows is version 10 or higher)
    [√] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1)
    [√] Chrome - develop for the web
    [√] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.4.3)
    [√] Android Studio (version 2021.1)
    [√] Android Studio (version 2021.3)
    [√] Android Studio (version 2022.1)
    [√] IntelliJ IDEA Community Edition (version 2022.2)
    [√] VS Code (version 1.79.0)
    [√] Connected device (3 available)
    [√] Network resources

Flutter Upgrade Results:

Downloading Dart SDK from Flutter engine effea50196ca4ee957b24d37c3e6766654bde549...
Expanding downloaded archive...
Building flutter tool...
Running pub upgrade...
Resolving dependencies... (5.9s)
Got dependencies.
Flutter is already up to date on channel master
Flutter 3.12.0-3.0.pre.67 • channel master • https://github.com/flutter/flutter.git
Framework • revision 4f94dee851 (83 minutes ago) • 2023-06-12 01:57:26 -0400
Engine • revision effea50196
Tools • Dart 3.1.0 (build 3.1.0-197.0.dev) • DevTools 2.24.0

Dart 3 语法在 Android Studio 上不受支持。

答案1

得分: 1

修复:问题出在我使用的是 Android Studio 2021 Bumblebee 版本。要解决这个问题,您需要升级到最新版本。

英文:

FIX The reason was me using Android Studio 2021 Bumblebee. To fix the problem you need to update to the latest version

huangapple
  • 本文由 发表于 2023年6月12日 14:31:13
  • 转载请务必保留本文链接:https://go.coder-hub.com/76454086.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定