skip to Main Content

Azure pipeline getting ndk version error while gradle build React Native Android.

  • What went wrong:
    Execution failed for task ‘:app:stripReleaseDebugSymbols’.

No version of NDK matched the requested version 21.4.7075529. Versions available locally: 23.2.8568313, 24.0.8215888, 25.0.8775105, 25.0.8775105

  • Try:
    Run with –stacktrace option to get the stack trace. Run with –info or –debug option to get more log output. Run with –scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 7m 15s
549 actionable tasks: 549 executed
Error: The process ‘/Users/runner/work/1/s/android/gradlew’ failed with exit code 1
at ExecState._setResult (/Users/runner/work/_tasks/Gradle_8d8eebd8-2b94-4c97-85af-839254cc6da4/2.200.2/node_modules/azure-pipelines-task-lib/toolrunner.js:944:25)
at ExecState.CheckComplete (/Users/runner/work/_tasks/Gradle_8d8eebd8-2b94-4c97-85af-839254cc6da4/2.200.2/node_modules/azure-pipelines-task-lib/toolrunner.js:927:18)
at ChildProcess. (/Users/runner/work/_tasks/Gradle_8d8eebd8-2b94-4c97-85af-839254cc6da4/2.200.2/node_modules/azure-pipelines-task-lib/toolrunner.js:840:19)
at ChildProcess.emit (events.js:198:13)
at maybeClose (internal/child_process.js:982:16)
at Socket.stream.socket.on (internal/child_process.js:389:11)
at Socket.emit (events.js:198:13)
at Pipe._handle.close (net.js:607:12)
##[error]Error: The process ‘/Users/runner/work/1/s/android/gradlew’ failed with exit code

here is image of error when pipeline fail

2

Answers


  1. Chosen as BEST ANSWER

    I have updated the NDK version from 21.4.7075529 to 25.0.8775105. When we are updating the NDK version, we also need to update our project Gradle version which supports the updated NDK version.


  2. No version of NDK matched the requested version 21.4.7075529. Versions available locally: 23.2.8568313, 24.0.8215888, 25.0.8775105, 25.0.8775105

    From the error message, the root cause of this issue is that the Android NDK version 21.4.7075529 doesn’t exists on the agent.

    Refer to this ticker: Android NDK 21 will be replaced in favor of 25 on August, 1st

    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)

    The Android NDK version on Microsoft-hosted agent has been upgraded to version 25.

    To solve your issue, you need to add a step to your Pipeline to install the Android NDK version 21.4.7075529 .

    Windows

    $sdkRoot = "C:Androidandroid-sdk"
    $sdkManager = "$sdkRootcmdline-toolslatestbinsdkmanager.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"
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search