Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[all OSs] Android NDK 21 will be replaced in favor of 25 on August, 1st #5930

Closed
10 tasks done
ddobranic opened this issue Jul 18, 2022 · 8 comments
Closed
10 tasks done
Assignees
Labels
Announcement Area: Android awaiting-deployment Code complete; awaiting deployment and/or deployment in progress OS: macOS OS: Ubuntu OS: Windows

Comments

@ddobranic
Copy link
Contributor

ddobranic commented Jul 18, 2022

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"
@chrisbehanna
Copy link

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.

@miketimofeev miketimofeev added the awaiting-deployment Code complete; awaiting deployment and/or deployment in progress label Aug 3, 2022
@ddobranic
Copy link
Contributor Author

@chrisbehanna you can install NDK 21 in runtime. Please see 'Mitigation ways' section in the announcement, above.

@FlorianKirmaier
Copy link

Is there a way, to use an Image from before this change?

ncw added a commit to rclone/rclone that referenced this issue Aug 3, 2022
Before this change the android build started failing with

    gomobile: ANDROID_NDK_HOME specifies /usr/local/lib/android/sdk/ndk/25.0.8775105
    which is unusable: unsupported API version 16 (not in 19..33)

This was caused by a change to github actions, but is ultimately due
to an issue in gomobile.

See: actions/runner-images#5930
See: lightningnetwork/lnd#6651
@mikhailkoliada
Copy link
Contributor

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.

ncw added a commit to rclone/rclone that referenced this issue Aug 3, 2022
Before this change the android build started failing with

    gomobile: ANDROID_NDK_HOME specifies /usr/local/lib/android/sdk/ndk/25.0.8775105
    which is unusable: unsupported API version 16 (not in 19..33)

This was caused by a change to github actions, but is ultimately due
to an issue in gomobile with the newest version of the SDK.

This change fixes the problem by declaring a minimum API version of 21
and using version 21 compilers to build everything and using the
default NDK in github actions.

See: actions/runner-images#5930
See: lightningnetwork/lnd#6651
ncw added a commit to rclone/rclone that referenced this issue Aug 3, 2022
Before this change the android build started failing with

    gomobile: ANDROID_NDK_HOME specifies /usr/local/lib/android/sdk/ndk/25.0.8775105
    which is unusable: unsupported API version 16 (not in 19..33)

This was caused by a change to github actions, but is ultimately due
to an issue in gomobile with the newest version of the SDK.

This change fixes the problem by declaring a minimum API version of 21
and using version 21 compilers to build everything and using the
default NDK in github actions.

See: actions/runner-images#5930
See: lightningnetwork/lnd#6651
yifanyang added a commit to firebase/firebase-android-sdk that referenced this issue Aug 3, 2022
NDK r21 is no longer provided by default on GitHub Actions.

actions/runner-images#5930
ncw added a commit to rclone/rclone that referenced this issue Aug 4, 2022
Before this change the android build started failing with

    gomobile: ANDROID_NDK_HOME specifies /usr/local/lib/android/sdk/ndk/25.0.8775105
    which is unusable: unsupported API version 16 (not in 19..33)

This was caused by a change to github actions, but is ultimately due
to an issue in gomobile with the newest version of the SDK.

This change fixes the problem by declaring a minimum API version of 21
and using version 21 compilers to build everything and using the
default NDK in github actions.

See: actions/runner-images#5930
See: lightningnetwork/lnd#6651
lfkellogg pushed a commit to firebase/firebase-android-sdk that referenced this issue Aug 5, 2022
NDK r21 is no longer provided by default on GitHub Actions.

actions/runner-images#5930
wtdcode added a commit to unicorn-engine/unicorn that referenced this issue Aug 14, 2022
dmitrykobets-msft added a commit to microsoft/GSL that referenced this issue Aug 17, 2022
actions/runner-images#5930 recently updated the NDK version, resulting in test breakages. Update the version.
@tabishhussain63
Copy link

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'

@miketimofeev
Copy link
Contributor

miketimofeev commented Aug 22, 2022

@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.

@m-kuhn
Copy link

m-kuhn commented Aug 29, 2022

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?

@miketimofeev
Copy link
Contributor

@m-kuhn this is the new image that is being deployed. We are going to finish the deployment and update the documentation today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Announcement Area: Android awaiting-deployment Code complete; awaiting deployment and/or deployment in progress OS: macOS OS: Ubuntu OS: Windows
Projects
None yet
Development

No branches or pull requests

9 participants
@m-kuhn @FlorianKirmaier @miketimofeev @chrisbehanna @mikhailkoliada @ddobranic @tabishhussain63 and others