From 228c4f45e720111e4597d12ab7e8bb453c0ddf57 Mon Sep 17 00:00:00 2001 From: Dibir Magomedsaygitov <61747324+dibir-magomedsaygitov@users.noreply.github.com> Date: Mon, 1 Nov 2021 17:14:51 +0300 Subject: [PATCH] add android-ndk-latest-home env variable on ubuntu18 (#4385) --- images/linux/scripts/installers/android.sh | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/images/linux/scripts/installers/android.sh b/images/linux/scripts/installers/android.sh index aef8f590..cb56acde 100644 --- a/images/linux/scripts/installers/android.sh +++ b/images/linux/scripts/installers/android.sh @@ -88,11 +88,9 @@ done # Link issue xamarin-android: https://github.com/xamarin/xamarin-android/issues/5526 ln -s $ANDROID_SDK_ROOT/ndk/$ndkDefaultFullVersion $ANDROID_NDK_ROOT -if isUbuntu20; then - ANDROID_NDK_MAJOR_LATEST=(${ANDROID_NDK_MAJOR_VERSIONS[-1]}) - ndkLatestFullVersion=$(get_full_ndk_version $ANDROID_NDK_MAJOR_LATEST) - echo "ANDROID_NDK_LATEST_HOME=$ANDROID_SDK_ROOT/ndk/$ndkLatestFullVersion" | tee -a /etc/environment -fi +ANDROID_NDK_MAJOR_LATEST=(${ANDROID_NDK_MAJOR_VERSIONS[-1]}) +ndkLatestFullVersion=$(get_full_ndk_version $ANDROID_NDK_MAJOR_LATEST) +echo "ANDROID_NDK_LATEST_HOME=$ANDROID_SDK_ROOT/ndk/$ndkLatestFullVersion" | tee -a /etc/environment availablePlatforms=($($SDKMANAGER --list | sed -n '/Available Packages:/,/^$/p' | grep "platforms;android-[0-9]" | cut -d"|" -f 1)) allBuildTools=($($SDKMANAGER --list | grep "build-tools;" | cut -d"|" -f 1 | sort -u))