Set the default Android platform to 21

Also explain that the "zip" command is required to build AAR archives
and that NDK_PLATFORM can be used to override the target platform.

Fixes #1440
This commit is contained in:
Frank Denis
2025-01-16 14:36:11 +01:00
parent ce07d6c82c
commit 9c530b8aff
2 changed files with 9 additions and 1 deletions

View File

@@ -9,6 +9,13 @@ SODIUM_VERSION="1.0.21.0"
NDK_VERSION=$(grep "Pkg.Revision = " <"${ANDROID_NDK_HOME}/source.properties" | cut -f 2 -d '=' | cut -f 2 -d' ' | cut -f 1 -d'.')
DEST_PATH=$(mktemp -d)
if which zip >/dev/null; then
echo "The 'zip' command is installed."
else
echo "The 'zip' command is not installed. Please install it before running this script."
exit 1
fi
cd "$(dirname "$0")/../" || exit
make_abi_json() {

View File

@@ -1,7 +1,8 @@
#! /bin/sh
if [ -z "$NDK_PLATFORM" ]; then
export NDK_PLATFORM="android-19"
export NDK_PLATFORM="android-21"
echo "Compiling for default platform: [${NDK_PLATFORM}] - That can be changed by setting an NDK_PLATFORM environment variable."
fi
export NDK_PLATFORM_COMPAT="${NDK_PLATFORM_COMPAT:-${NDK_PLATFORM}}"
export NDK_API_VERSION="$(echo "$NDK_PLATFORM" | sed 's/^android-//')"