React-native organizes its project like :
android --build.gradle --settings.gradle ios node_modules index.android.js index.ios.js
The problem is that if I open up at the root level, IntelliJ can’t run Gradle, it will say
Error running build (1): Module 'ReactLearning' is not backed by gradle
However, if I open up at
./android 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.
Is there something I can do to tell the IDE/ Gradle that the relevant project is one subdirectory down?
When you create a React Native project, an Android project is created inside its file tree:
Now, you can open the Android project using IntelliJ Idea or Android studio, with the path:
And the untitled project which has been created with
react-native init using WebStorm, which has JS support, with the path: