Getting react-native running on Fedora 22

I had a little bumps along the way following react-native’s OSX only instructions while setting up development environment on my Fedora 22 system, so here’s quick notes how I got it up and running.

  1. Installed Node v4.1.2 using NVM
  2. Installed OpenJDK from Fedora repos

    sudo dnf install java-1.8.0-openjdk java-1.8.0-openjdk-devel
    
  3. Installed tools only version of the Android SDK

After those steps I created test project and tried to run react-native and adb port forwarding

adb reverse tcp:8081 tcp:8081 && react-native run-android

… encountering following output:

… lots of log output snipped away …

java.io.IOException: Cannot run program “/opt/android-sdk/build-tools/23.0.1/aapt”: error=2, No such file or directory

… lots of log output snipped away …

Execution failed for task ‘:app:mergeDebugResources’.

> Crunching Cruncher abc_ic_ab_back_mtrl_am_alpha.png failed, see logs

Fierce googling provided me information that issue was caused by 32 bit aapt and it could be fixed by installing 32 bit versions of shared libs it required:

sudo dnf install zlib.i686 libstdc++.i686

Summary

  • Install node version 4.*.* with NVM
  • Install missing 32 bit libs
  • Reverse forward 8081 port for react-native to be able to fetch JS bundle
blog comments powered by Disqus