I am currently evaluating Capacitor as framework and try to open it in IDEA Ultimate. What I want is to have one project with the android platform as module (or facet?), so that I don't have to switch the IDE between deploying the app to my device and making changes to the webapp code.
I tried a few approaches:
- open the android folder as project
- now I have a working android project with three modules: "app", "capacitor-android" and "capacitor-cordova-android-plugins"
- add the project root as web module
- now I have two root folders in project view: "android" and my project root
- open the project root folder as project
- add angular as module/ add angular as facet
- now I have four main folders "app", "capacitor-android", "capacitor-cordova-android-plugins" and my project root.
All of them look fine, but in the end IDEA is no longer recognizing the dependency of "capacitor-android" that the "app" module has. So the MainActivity class has a lot of red lines because the imports "com.getcapacitor" are not found.
Has anyone successfully worked with IDEA Ultimate and capacitor without using two instances of idea, one for the webapp and one for the angular app?
Also, I don't understand the difference between facet and module, it seems IDEA is using the same approach, no matter what I use. Maybe there is a better approach that I could try?