Undocumented Manual of React Native for 64 bit Linux
Below are some points which I got from my effort in building Android application using React Native with my 64 bit Linux box. These points, AFAIK, are not documented (yet).
- Nuclide is enough, eventhough Android Studio could provide more tooling.
- Gradle did not recognize ANDROID_HOME env var (and I don’t know why). The workaround is simple: create $PROJECT_DIR/local.properties, put this content inside: sdk.dir=/path/to/android-sdk-linux.
- Gradle could not find “appcompat-v7:23.0.1.jar” if you don’t install “Extras — Android Support Repository” from SDK manager (android).
- Install 32 bit libs. Every distro usually has its own facilities for multilib. In my Arch Linux, activate these lines at /etc/pacman.conf:
Include = /etc/pacman.d/mirrorlist
- These 32 bit libs are needed: lib32-gcc-libs (6.2.1–1), lib32-glibc (2.24–2), lib32-libstdc++ (5 3.3.6–7), lib32-ncurses (6.0–2), lib32-zlib (1.2.8–1). Note that I include libs version just for my own reference, packages name are more important although they may not be the same with other distros.
- To run android application, emulator should be executed in its own shell process. react-native run-android should be executed in another shell:
shell 1> emulator -avd nexus6-api23
shell 2> react-native run-android