12. To install/demo an Android app you’ll need to:
1. Turn on developer mode (click “about phone” 10 times)
13. Setting up the Android Environment
(you don’t need to install Android Studio)
http://facebook.github.io/react-native/releases/0.21/docs/getting-started.html
1. Install Android SDK (Software Development Kit)
2. Define the ANDROID_HOME environment variable
inside of ~/.bashrc:
export ANDROID_HOME=’$HOME/Android/Sdk’
3. Configure the SDK
type “android” in the terminal
install suggested packages
4. “npm install -g react-native-cli”
14. Create an app
1. Find a starter
2. Clone the app
3. “cd ./app”
4. “npm install”
15. Running an app
1. Connect a device or run Genymotion
2. “react-native start”
3. “react-native run-android”
4. “adb reverse tcp:8081 tcp:8081” (device) or enter IPAddress:8081
5. demo
16. Debugging Tools
1. shake the phone to get the menu
2. enable hot-reloading
3. debug in chrome
4. inspector
17. The Dance ( or adding Android Modules )
+ npm install [module]
18. Adding images
1. add your_image.png to /res folder
2. source={require(‘image!your_image’)} // no extension
3. you cannot use a this in a loop like require(imgArr[i])
19. Adding icons
1. add react-native-vector-icons (do the dance)
2. import Icon from ‘react-native-vector-icons/FontAwesome’
3. <Icon name=’android-menu’ size={30} color=’#fff’ />