Flutter/Android Studio代码自动补全失效问题求助
Flutter与Android Studio升级后代码自动补全异常问题
数月前将Flutter升级至3.x版本、Android Studio从4.x升级至2021.x版本后,代码自动补全功能出现异常:仅能提示当前文件或已显式导入文件中的内容,无法自动导入外部库及项目内自定义类,需手动查找包路径导入。未开启省电模式,已按照相关建议清理以下缓存及目录:
Gradle (Windows: user/.gradle) Pub cache (Windows: user/appdata/local/pub) Android Studio Windows: user/.android user/appdata/local/google/androidstudioX caches compiler compiler-server conversion frameworks IntelliJ (Project Path ./.idea) Build Path (Project Path ./build)
flutter doctor检测结果:
[√] Flutter (Channel stable, 3.3.7, on Microsoft Windows [Version 10.0.19045.2251], locale de-DE) • Flutter version 3.3.7 on channel stable at E:\Android\Flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision e99c9c7cd9 (4 weeks ago), 2022-11-01 16:59:00 -0700 • Engine revision 857bd6b74c • Dart version 2.18.4 • DevTools version 2.15.0 [√] Android toolchain - develop for Android devices (Android SDK version 30.0.3) • Android SDK at E:\Android\sdk • Platform android-33, build-tools 30.0.3 • ANDROID_HOME = E:\Android\sdk • Java binary at: E:\Android\Android Studio 2021.3.1 RC 1\jre\bin\java • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866) • All Android licenses accepted. [√] Chrome - develop for the web • Chrome at C:\Program Files (x86)\Google\Chrome\Application\chrome.exe [X] Visual Studio - develop for Windows X Visual Studio not installed; this is necessary for Windows development. Download at https://visualstudio.microsoft.com/downloads/. Please install the \"Desktop development with C++\" workload, including all of its default components [√] Android Studio (version 2021.3) • Android Studio at E:\Android\Android Studio 2021.3.1 RC 1 • Flutter plugin can be installed from: https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 11.0.13+0-b1751.21-8125866) [√] Connected device (3 available) • Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.19045.2251] • Chrome (web) • chrome • web-javascript • Google Chrome 107.0.5304.107 • Edge (web) • edge • web-javascript • Microsoft Edge 103.0.1264.44 ! Device emulator-5554 is not authorized. You might need to check your device for an authorization dialog. [√] HTTP Host Availability • All required HTTP hosts are available ! Doctor found issues in 1 category.
补充说明:
- 旧版本项目中该功能正常。
- 当前项目lib目录包含超1000个文件,是否因项目过大导致?
- 在安装了Flutter/Dart插件的纯IntelliJ中该功能正常。
内容的提问来源于stack exchange,提问作者S-Man
相关产品推荐
相关产品推荐

