Reputation: 1776
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?
Upvotes: 14
Views: 989
Reputation: 1846
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.
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.
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.
Upvotes: 1