Skip to content
This repository has been archived by the owner on Jun 3, 2020. It is now read-only.

Setting up Development Environment (Linux)

dinithminura edited this page Dec 5, 2017 · 4 revisions

Setting up development environment (Linux)

To set up the development environment and run the app on your device, you need the following:

Linux OS

Android Phone with connecting wire

Android Studio

  1. Install android studio from the official site
  2. Extract android studio to a folder
  3. Open studio by changing terminal's directory to the folder where you unzipped
  4. Change directory to the bin folder inside the Studio folder and type in terminal ./studio.sh
  5. Follow on-screen instructions till android studio launches launches successfully

Node Js

Type the following commands in your terminal
sudo apt-get update
sudo apt-get install nodejs
sudo apt-get install npm

React Native

Type the following commands in your terminal
sudo npm install -g create-react-native-app
sudo npm install -g react-native-cli

Git

sudo apt install git

Downloading and loading dengue stop

  1. Change directory to the place where you want dengue stop project to be downloaded
  2. Run the following command: git clone https://github.com/scorelab/dengue-stop.git
  3. To install node modules, run the command: npm install
  4. To develop the project, download any text editor and start working by opening the folder in the editor
  5. To run the app on your device, connect a device with your laptop and run the command: react-native run-android

Troubleshooting

You're most likely to encounter some of the following errors after you run the command: react-native run-android.

Not accepted terms of Android SDK

Open android studio and make sure that you create a sample project with empty activity and accept all of the terms and conditions that pop up on your screen.

Android SDK not found

Run the following commands:
sudo apt-get install android-sdk
export ANDROID_HOME=$HOME/Android/Sdk
export PATH=$PATH:$ANDROID_HOME/tools

ADB Reverse Error

Run the following commands:
sudo apt install android-tools-adb android-tools-fastboot
Change directory to project location
mkdir android/app/src/main/assets
react-native bundle --platform android --dev false --entry-file index.android.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res

With everything now set up, you can now develop the project or run it on your device