flutter-intellij: Cannot find declaration to go to

Thanks for the feedback! If your issue is related to the Flutter framework itself, please open an issue at github.com/flutter/flutter.

Steps to Reproduce

When Ctrl + Click ,ide shows : Cannot find declaration to go to image

Version info

Please paste the output of running flutter doctor -v here (available from the command line or from Tools > Flutter > Flutter Doctor). It will provide the version of the Flutter framework as well as of the IntelliJ plugin.

[√] Flutter (Channel dev, v0.5.5, on Microsoft Windows [Version 10.0.16299.15], locale zh-CN)
    • Flutter version 0.5.5 at D:\FlutterSDK\flutter
    • Framework revision 020e0ef55c (8 days ago), 2018-06-14 13:17:08 -0700
    • Engine revision c3976b3c71
    • Dart version 2.0.0-dev.61.0.flutter-c95617b19c

[√] Android toolchain - develop for Android devices (Android SDK 27.0.3)
    • Android SDK at D:\AndroidSDK
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-27, build-tools 27.0.3
    • ANDROID_HOME = D:\AndroidSDK
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b01)
    • All Android licenses accepted.

[√] Android Studio (version 3.0)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin version 23.2.1
    • Dart plugin version 171.4424
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b01)

[√] IntelliJ IDEA Ultimate Edition (version 2018.1)
    • IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA 2018.1
    • Flutter plugin version 25.0.2
    • Dart plugin version 181.4203.498

[√] Connected devices (1 available)
    • G8142 • CB512EEZUJ • android-arm64 • Android 8.0.0 (API 26)

• No issues found!

About this issue

  • Original URL
  • State: open
  • Created 6 years ago
  • Reactions: 2
  • Comments: 26 (2 by maintainers)

Most upvoted comments

emmm… I think I solve it.

  • 1.close your project
  • 2.delete .idea folder and *.iml files in root path
  • 3.open your project

and then i found the *.iml not generated again.

For people seeing this issue, I would:

  • ensure that a flutter sdk is configured in the settings, Language & Frameworks > Flutter page
  • try the File > Invalidate caches menu item

Seems that one of the following actions (or their combination) solves the problem:

  1. having a good git ignore call git clean -xffd My gitignore: https://gist.github.com/Diaglyonok/64adccaf923dc6c7522cab1e89a2fe15
  2. switching flutter channel to any other and back. Commands example (if current channel is stable): flutter channel dev flutter pub get flutter channel stable

after any of these actions: flutter pub get flutter clean flutter run …

Since this problem does not always appear, at the moment I cannot test these solutions again, if you have such a problem, try this solution and report the result, please.

flutter pub get

it works for me!!! thanks

I am still having this problem with 1.17.4

not solved issue, reopen please