Flutter/Dart autocomplete works in VS Code, but not in Android Studio

谁说我不能喝 提交于 2020-01-22 20:47:05

问题


I thought AS was the one primary supported environment when it comes to develop, so this is really unusual.

Alt + Enter in Android Studio

  • Flutter Plugin: v35.2.1

  • Dart Plugin: v183.6270

The very same project opened in VS Code, after reading this.

Ctrl + . in VS Code

  • Flutter Plugin: v.2.26.1

  • Dart Plugin: v2.26.1

Flutter:

flutter --version

Flutter 1.2.1 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 8661d8aecd (3 months ago) • 2019-02-14 19:19:53 -0800
Engine • revision 3757390fa4
Tools • Dart 2.1.2 (build 2.1.2-dev.0.0 0a7dcf17eb)

WHY IS THAT?


回答1:


This question was answered on Github.

Android Studio has an older version of the Dart plugin (183.6270) than IntelliJ (191.7019). That newer Dart plugin supports the feature of the analysis server that shows completions for symbols that are not in scope. If you select one of these symbols, your imports will be updated for you automatically.

As Android Studio revs, and moves to a version of the IntelliJ platforms that supports the new Dart plugin, Android Studio will get this feature as well.

Tldr: IntelliJ and VS Code have more up-to-date versions than Android Studio.



来源:https://stackoverflow.com/questions/55990257/flutter-dart-autocomplete-works-in-vs-code-but-not-in-android-studio

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!