Here is the exact transcript I used to build aprsdroid from a scratch environment. I used Docker to ensure I was working from a completely fresh Ubuntu 22.04, however, there is no requirement that this be done in Docker or with Ubuntu Linux as long as you have the correct Android build environment installed. First, I started a new, blank Ubuntu container:

docker container run -it –name=android ubuntu:22.04
As the default Ubuntu container does not create a regular user, I added one to avoid running as root:

apt-get update && apt-get install -y sudo
useradd -m -s /bin/bash -G sudo user
(echo user; echo user) | passwd user
sudo -u user -i
I then installed a few required programs from the Ubuntu package repository:

sudo apt-get install -y git openjdk-8-jdk vim-nox wget unzip
Then, I installed the Android SDK for API level 24. You can use whatever install method or graphical interface you want, but a completely automated set of instructions to do this on Linux are as follows:

export ANDROID_SDK_ROOT=”$(pwd)/android”
mkdir -p “${ANDROID_SDK_ROOT}”
wget “https://dl.google.com/android/repository/${cmdline_tool_file}”
unzip “${cmdline_tool_file}” -d “${ANDROID_SDK_ROOT}/cmdline-tools”
rm -f “${cmdline_tool_file}”
export PATH=”${ANDROID_SDK_ROOT}/cmdline-tools/tools/bin:${PATH}”
export PATH=”${ANDROID_SDK_ROOT}/platform-tools:${PATH}”
export PATH=”${ANDROID_SDK_ROOT}/emulator:${PATH}”
mkdir “${ANDROID_SDK_ROOT}/licenses”
echo 24333f8a63b6825ea9c5514f83c2829b004d1fee > “${ANDROID_SDK_ROOT}/licenses/android-sdk-license”
echo 84831b9409646a918e30573bab4c9c91346d8abd > “${ANDROID_SDK_ROOT}/licenses/android-sdk-preview-license”
sdkmanager –install emulator ‘system-images;android-24;default;armeabi-v7a’
There’s a lot there, but it’s just the same procedure you might do from the normal installer of selecting which SDK components to install and accepting license agreements with clicks from your mouse. Once you have the SDK installed correctly with the environment variables set, then it’s just cloning the repo, setting the API key, and building it:

git clone https://github.com/ge0rg/aprsdroid.git
cd aprsdroid/
git submodule update –init –recursive
echo “mapsApiKey=a” > local.properties

./gradlew assemble
This commands are all taken from a script I use regularly to do clean-room builds of aprsdroid from a scratch container so they should work as is to make a successful build.