How do I setup java code completion for a react native project on intellij?
<p>React-native organizes its project like : </p>

<pre><code>android
--build.gradle
--settings.gradle
ios
node_modules
index.android.js
index.ios.js
</code></pre>

<p>It's a little messy and requires editing js, java and objective c code, and the android studio does not support any javascript code completion. So I decided to use IntelliJ. </p>

<p>The problem is that if I open up at the root level, IntelliJ can't run Gradle, it will say <code>Error running build (1): Module 'ReactLearning' is not backed by gradle</code></p>

<p>However, if I open up at <code>./android</code> in either android studio or IntelliJ, it works fine and I can see all the external libraries and code completion. But now I can't edit any of the code at the root level. I could have 2 editors open one at the root and one specifically for android, but then the IDEs are constantly overwriting each other's files. </p>

<p>Is there something I can do to tell the IDE/ Gradle that the relevant project is one subdirectory down?</p>