- Install Node, NPM
- Install the React Native CLI:
npm install -g react-native-cli
- Clone this repository
- Install our dependencies: run
npm install
in the directorypackage.json
is in - For Android: install Android Studio, start an emulator, and run
react-native run-android
- For iOS: install Xcode and run
react-native run-ios
- Try editing
index.android.js
orindex.ios.js
and reloading the app
Most of this comes from the React Native Docs.
Follow the docs at Generating Signed APK.
In node_modules/react-native/react.gradle
, add:
doLast {
def moveFunc = { resSuffix ->
File originalDir = file("${resourcesDir}/drawable-${resSuffix}")
if (originalDir.exists()) {
File destDir = file("${resourcesDir}/drawable-${resSuffix}-v4")
ant.move(file: originalDir, tofile: destDir)
}
}
moveFunc.curry("ldpi").call()
moveFunc.curry("mdpi").call()
moveFunc.curry("hdpi").call()
moveFunc.curry("xhdpi").call()
moveFunc.curry("xxhdpi").call()
moveFunc.curry("xxxhdpi").call()
}
in the currentBundleTask
's creation block before generating the release APK.
Solution found from this issue: facebook/react-native#5787