This bash script builds "libpng" as static libraries for android.
(libpng official website)
This script makes "libpng.a" compatible with Android architectures, including arm64-v8a, armeabi-v7a, x86, and x86_64.
git clone https://github.com/glennrp/libpng -b v1.6.43
For example:
export NDK=/Users/your_id/Library/Android/sdk/ndk/26.2.11394342
export TOOLCHAIN=$NDK/toolchains/llvm/prebuilt/linux-x86_64
export TOOLCHAIN=$NDK/toolchains/llvm/prebuilt/windows-x86_64
export TOOLCHAIN=$NDK/toolchains/llvm/prebuilt/darwin-x86_64
export API=21
./build