How to make Intellij Idea's Intellisense work on C++ and Kotlin on a Flutter project?
Asked Answered
A

1

14

Due to opening a Flutter project into Intellij Idea, that is, opening the folder that contains both an Android project and an iOS project, Intellij Idea does not recognize the Android gradle project and thus both C++ and Kotlin intellisense won't work. I have to open one instance for the android project and another for the flutter project.

Having everything on one window is much better, specially if you develop inside docker using the docker plugin. Also it consumes much less RAM.

Opening thins in Android Studio also has this same problem.

So, how can I use C++ and Kotlin intellisense on Intellij Idea/Android Studio in a Flutter project?

Allianora answered 29/12, 2020 at 4:56 Comment(5)
does View Menu -> Tool Windows -> logcat working to show logcat tab?Rumble
@Priyankagb yes, works for logcatAllianora
You might check Preferences -> Editor -> Language Injections.Bombshell
There should be an IDE action called something like Import Gradle Project. I believe it should work when you import the main build.gradle file of the android projectBrezin
@Brezin couldn't find such optionAllianora
T
1

What usually works for me in these situations is to use modules. That is, you create one project and add both the Android project and Flutter project as a module (you can basically look at a module as a sub-project). How I usually go about this is as follows.

  1. Create a new project from existing sources by going to File > New > Project from Existing Sources and select the root folder of one of your modules.

  2. Create a new module from existing sources by going to File > New > Module from Existing Sources and select the root folder of your other module.

You should now have one project (and thus one instance of IntelliJ or Android Studio) that contains your sub-projects as modules, and the autocompletion should be available for both of them.

Note. You can view all the modules currently in your project in the project settings (File > Project Structure or Ctrl + Alt + Shift + S) in the modules tab.

Tambac answered 21/6, 2021 at 10:29 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.