Before the installation, it’s required to download the following SDK tools:

 

commandlinetools-*.zip 

 

android-ndk-*.zip 

 

These files are available for download at https://developer.android.com (the names of the archives vary depending on the operating system and tool version). 

 

The example below is built using commandlinetools-linux-6858069_latest.zip and android-ndk-r21d-linux-x86_64.zip:

 

sudo apt-get install openjdk-8-jdk 

export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64 

 

export ANDROID_HOME=$HOME/android-sdk-linux 

 

unzip commandlinetools-linux-6858069_latest.zip -d $ANDROID_HOME 

unzip android-ndk-r21d-linux-x86_64.zip 

 

$ANDROID_HOME/cmdline-tools/bin/sdkmanager --sdk_root=$ANDROID_HOME --update 

$ANDROID_HOME/cmdline-tools/bin/sdkmanager --sdk_root=$ANDROID_HOME "platforms;android-26" "build-tools;27.0.3" 

$ANDROID_HOME/cmdline-tools/bin/sdkmanager --sdk_root=$ANDROID_HOME --licenses 

 

tar xf eveusbd_java-*.tar.gz 

tar xf eveusb-dev_*.armeabi-v7a.tgz -C eveusbd_java/example/ 

 

cd eveusbd_java/example/ 

ANDROID_NDK_HOME=$HOME/android-ndk-r21d ./gradlew build