Do you want to settting up SDK & NDK to compile android app on any platform?
Please look into this script termux_setup_android_dev.sh
On termux, Run this script termux_setup_android_dev.sh will do that for you.
Want to know how does this work?
Please checkout tests/test_toolchain.sh
Get NDK: google site or github site
Then run:
## Unzip android ndk to somewhere
unzip <android_ndk_package>
## Get resouce from ndk
./android-cross-toolchain.sh setup <path_to_ndk_root>
Get LLVM
-
alpine:
apk add llvm lld
-
zig:
export ZIG=<path_to_zig>
-
static-clang, llvm-project, llvmbox or other llvm toolchain :
export PATH=${PATH}:<path_to_llvm_bin>
Test toolchain
./bin/aarch64-linux-android21-clang tests/hello.c
./bin/aarch64-linux-android21-clang++ tests/hello.cpp