flutter / flutter/flutter-intellij

Kotlin files show "Red Symbols" (Unresolved reference) despite project building and running successfully

Open
#8,711 0 comments 0 reactions 0 assignees View on GitHub
dependency: android-studio P3 platform-android-studio
Dominant language
Java
Stars
2k
Forks
356
Avg merge
1d 11h
Merged PRs (30d)
27

Description

Image

## Summary:

Kotlin code in the android directory shows errors (red underlines) for valid symbols/variables. Interestingly, these errors disappear immediately after I manually make a small edit to the file.

## Steps to Reproduce:

1. Open a Flutter project's android folder,

2. Gradle sync successfully.

3. Wait for a few days then open android folder again

4. Observe Kotlin symbols (e.g., FlutterActivity, MethodChannel) turning red.

5. Make a small change (like adding a space), and the red lines vanish.

## Environment:

Flutter version:
```
Flutter (Channel stable, 3.38.5, on Microsoft Windows [Version 10.0.19045.6093], locale zh-CN)
```
Android Studio version:
```
Android Studio Otter 3 Feature Drop | 2025.2.3
Build #AI-252.28238.7.2523.14688667, built on January 9, 2026
Runtime version: 21.0.8+-14196175-b1038.72 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Toolkit: sun.awt.windows.WToolkit
Windows 10.0
GC: G1 Young Generation, G1 Concurrent GC, G1 Old Generation
Memory: 12280M
Cores: 16
Registry:
ide.experimental.ui=true
Non-Bundled Plugins:
com.intellij.marketplace (252.28238.36)
com.markskelton.one-dark-theme (6.2.0)
Statistic (5.2)
Dart (500.0.0)
com.localizely.flutter-intl (1.18.8-2024.2)
Lombook Plugin (252.27397.28)
com.wakatime.intellij.plugin (15.0.4)
cn.neday.excavator (2.4.8)
izhangzhihao.rainbow.brackets (2025.3.6)
pl.pszklarska.pubversionchecker (1.3.5)
mobi.hsz.idea.gitignore (4.5.6)
awesome.console.x (0.1337.35)
io.flutter (88.2.0)
com.ruiyu.ruiyu (5.2.7)
```

Kotlin plugin version:
```
bundled 252.28238.7.2523.14688667-A
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.