[all OSs] Android NDK 21 will be replaced in favor of 25 on August, 1st
ddobranic opened this issue · comments
Breaking changes
NDK r21 will be replaced by NDK r25
Target date
The propagation is starting on August, 1st and will take 2-3 days
The motivation for the changes
We are replacing r21 with r25 as we support two latest LTS versions according to our Software and image guidelines(we support 1 latest non-LTS and 2 latest LTS versions of NDK)
Possible impact
If your project depends on NDK r21 it can be broken
Platforms affected
- Azure DevOps
- GitHub Actions
Virtual environments affected
- Ubuntu 18.04
- Ubuntu 20.04
- Ubuntu 22.04
- macOS 10.15
- macOS 11
- macOS 12
- Windows Server 2019
- Windows Server 2022
Mitigation ways
- To install NDK r21 in runtime use the following snippets:
- Windows
$sdkRoot = "C:\Android\android-sdk" $sdkManager = "$sdkRoot\cmdline-tools\latest\bin\sdkmanager.bat" Install-AndroidSDKPackages -AndroidSDKManagerPath $sdkManager ` -AndroidSDKRootPath $sdkRoot ` -AndroidPackages "ndk;21.4.7075529"
- macOS
ANDROID_HOME=$HOME/Library/Android/sdk SDKMANAGER=$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager echo y | $SDKMANAGER "ndk;21.4.7075529"
- Ubuntu
ANDROID_ROOT=/usr/local/lib/android ANDROID_SDK_ROOT=${ANDROID_ROOT}/sdk SDKMANAGER=${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager echo "y" | $SDKMANAGER "ndk;21.4.7075529"
We had no notice of this change at Mojang, and only learned of it today. We very strongly suggest delaying it two weeks so that we can prepare for it.
@chrisbehanna you can install NDK 21 in runtime. Please see 'Mitigation ways' section in the announcement, above.
Is there a way, to use an Image from before this change?
Is there a way, to use an Image from before this change?
No, but you can still install r21 in runtime as described, it is the only possible solution.
Hi I am trying to run ndk 21.3.6528147 on iOS macOS-11 and I followed the mitigation ways but still getting this error when I am trying to access android.ndkDirectory in gradle.
NDK is not installed
Can you help what am I missing here is my install ndk Job steps
- task: CmdLine@2
displayName: 'Install NDK 21.3.6528147'
inputs:
script: |
ANDROID_HOME=$HOME/Library/Android/sdk
SDKMANAGER=$ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager
echo y | $SDKMANAGER "ndk;21.3.6528147"
echo 'ANDROID_NDK=/usr/local/lib/android/sdk/ndk/21.3.6528147'
echo 'ANDROID_NDK_HOME=/usr/local/lib/android/sdk/ndk/21.3.6528147'
echo 'ANDROID_NDK_LATEST_HOME=/usr/local/lib/android/sdk/ndk/21.3.6528147'
echo 'ANDROID_NDK_ROOT=/usr/local/lib/android/sdk/ndk/21.3.6528147'
@tabishhussain63 if you'd like to set env variables you need to do it another way
ANDROID_NDK="/usr/local/lib/android/sdk/ndk/21.3.6528147"
echo "##vso[task.setvariable variable=ANDROID_NDK]$ANDROID_NDK"
and in the subtasks, the variable will be overridden by the new one.
On Ubuntu 20.04 virtual images, the documentation mentions 25.0.8775105 is installed still every other run, it's 25.1.8937393 instead. I assume this is not on purpose?
@m-kuhn this is the new image that is being deployed. We are going to finish the deployment and update the documentation today.