IntelliJ IDEA 2020.3.1中Flutter与Java代码自动补全(Intellisense)功能失效求助
Hey there, sorry to hear IntelliJ's code completion has suddenly stopped working on your Java/Flutter projects—let's walk through some less common fixes that might get it back up and running:
Check for plugin conflicts
Third-party plugins are a frequent culprit here. Head toSettings/Preferences > Plugins, disable all non-built-in plugins, then restart IDEA. If Intellisense starts working again, re-enable plugins one by one to pinpoint the problematic one. Note that some newer Flutter plugins might not be fully compatible with the 2020.3.1 IDE version—double-check plugin compatibility with your IDE release.Verify module dependency configuration
Corrupted module settings can break code recognition. Go toFile > Project Structure > Modules, select each of your project modules, and check theDependenciestab:- Ensure the correct JDK is listed for Java modules
- For Flutter modules, confirm the Flutter SDK path is properly linked and no dependencies are marked as missing
If anything looks off, re-add the SDKs or refresh dependencies.
Re-import your project
Sometimes IDE-generated config files (like.imlfiles) get corrupted. Remove the project from IDEA (don't delete local files!), then re-import it by selecting the project root and choosing the correct project type (Java/Flutter). Let IDEA rebuild all configuration files from scratch.Double-check code completion settings
It's easy to accidentally tweak these without noticing. Go toSettings/Preferences > Editor > General > Code Completion:- Make sure
Autopopup code completionis checked - Ensure options like
Show suggestions as you typeandInsert selected suggestion by pressing space, dot, etc.are enabled
Also, checkSettings/Preferences > Editor > Inspectionsto confirm you haven't disabled critical code inspections—Intellisense relies on these to generate accurate suggestions.
- Make sure
Clear IDE system cache (not just Invalidate Caches)
The "Invalidate Caches/Restart" doesn't always clear all system-level cache. Close IDEA entirely, then delete the system cache directory for your IDE version:- Windows:
C:\Users\<YourUsername>\.IntelliJIdea2020.3\system - Mac:
~/Library/Caches/JetBrains/IntelliJIdea2020.3 - Linux:
~/.cache/JetBrains/IntelliJIdea2020.3
Restart IDEA afterward—it will rebuild the cache from scratch.
- Windows:
Refresh Flutter pub dependencies
For Flutter projects, incomplete or corrupted pub dependencies can break Intellisense. Open a terminal in your project root, runflutter pub get, and fix any errors that pop up. Restart IDEA once the command completes successfully.
内容的提问来源于stack exchange,提问作者Pain

