-
Yarn
-
NodeJS (recommended version 22.18.0 or higher)
-
Docker (Docker Engine)
-
OpenJDK 18 (https://jdk.java.net/archive/)
- curl https://download.java.net/java/GA/jdk18.0.2/f6ad4b4450fd4d298113270ec84f30ee/9/GPL/openjdk-18.0.2_linux-x64_bin.tar.gz -o openjdk-18.0.2_linux-x64_bin.tar.gz
- tar -xzvf openjdk-18.0.2_linux-x64_bin.tar.gz
-
Android SDK Command-line Tools
Install via Android Studio SDK Manager:
https://developer.android.com/studio/install
or as standalone:
https://developer.android.com/tools -
Cargo nextest (https://nexte.st/book/installing-from-source.html)
The React Native tools require some environment variables to be set up in order to build apps with
native code.
Add the following lines to your $HOME/.bash_profile or $HOME/.profile config file:
PATH="$PATH:$ANDROID_HOME/cmdline-tools/latest/bin"
PATH="$PATH:$ANDROID_HOME/platform-tools"
PATH="$PATH:$ANDROID_HOME/emulator"
Add the following lines to your $HOME/.bashrc config file:
export ANDROID_SDK_ROOT="$HOME/Android/Sdk"
Also, make sure your JAVA_HOME is set, for example:
export JAVA_HOME="/usr/lib/jvm/jdk-18.0.2"
- Clone the repository.
- Go to the cloned repo
cd zingo-mobile. - In the
rustdirectory, run:
./build.sh
This step may take a long time. - From the root of the project, run:
yarn
- For Android emulations, you can create a new AVD, compatible with your CPU architecture i.e. x86_64 (https://developer.android.com/studio/run/managing-avds). The recommended API is API 30 (Android 11). Alternatively, you can connect to a physical device (https://reactnative.dev/docs/running-on-device).
- In
File > Settings, navigate toBuild, Execution and Deployment > Build Tools > Gradleand check theGradle JDKmatches your JDK version. - In a terminal, run:
yarn start - Open the
androiddirectory in Android Studio as a project, select 'app' and the previously created AVD in the upper toolbar and click the "Run 'app'" button. Alternatively, launch an AVD and in a separate terminal, run:
yarn android
You can also emulate android from the command line without using Android Studio.
- Check that the Android SDK cmdline-tools binaries are in the following directory path:
$ANDROID_HOME/cmdline-tools/latest/bin - From the root directory run:
scripts/start_interactive.sh -a x86
Outputs are generated inandroid/app/build/outputs/emulator_output