React native for android Script are created with "npx react-native init"
We strip the ios part We bundle it inside virtualenv We don't use Expo CLI
Project Structure Reference
- https://cheesecakelabs.com/blog/efficient-way-structure-react-native-projects/
- https://cheesecakelabs.com/blog/atomic-design-react
-
Make sure below library is installed
sudo apt install nodejs nodeenv openjdk-17-jre
-
Install Android SDK and create Android device
Android SDK is bundle inside Android Studio so use Android Studio for easier device management
sudo snap install --classic android-studio
-
Open Android Studio and create your device there
-
Setup environment in your ~/.bashrc or ~/.bash_aliases file
export ANDROID_SDK_ROOT=$HOME/Library/Android/Sdk export PATH=$PATH:$ANDROID_SDK_ROOT/emulator export PATH=$PATH:$ANDROID_SDK_ROOT/platform-tools
-
Install and cookiecutter this project
pip3 install --user cookiecutter cookiecutter gh:wiryonolau/cookiecutter-react-native
-
After finish activate virtualenv inside project root directory
source .env/bin/activate
Running Application require two separate terminal
First Terminal is to auto refresh your application on component change when developing
npx react-native start
Second Terminal to start android emulator with react-native
npx react-native run-android
- Install and using watchman
- Tutorial creating apk