neeraj
neeraj

Reputation: 11

Android -gradle task -Azure devops - Pipeline No toolchains found in the NDK toolchains folder for ABI with prefix: arm-linux-androideabi

I am trying to configure a CI pipeline in azure DevOps on Microsoft Hosted agent (windows-latest) gradle - 6.9 gradle plugin version :- 3.5.3 Getting below mentioned error :-

FAILURE: Build failed with an exception.

No toolchains found in the NDK toolchains folder for ABI with prefix: arm-linux-androideabi

Can anyone guide me on this how to give path for ndk through pipeline YAML or any best possible solution because i can't update gradle plugin version.

Upvotes: 1

Views: 735

Answers (2)

I added this command and it worked for me

- task: CmdLine@2
  displayName: "XA5101/NDK r22 Workaround"
  inputs:
    script: |
      ${ANDROID_HOME}/tools/bin/sdkmanager --install "ndk;21.4.7075529"
      echo "##vso[task.setvariable variable=ANDROID_NDK_HOME;]$ANDROID_HOME/ndk/21.4.7075529"
      echo 'Done!'

Upvotes: 0

d23
d23

Reputation: 186

I was having the same issue. While debugging I found $ANDROID_HOME_NDK is now version 21.4.7075529 in DevOps hosted agent agents

Warning: Observed package id 'ndk;21.4.7075529' in inconsistent location '/Users/runner/Library/Android/sdk/ndk-bundle' (Expected '/Users/runner/Library/Android/sdk/ndk/21.4.7075529')

But for some reason the pipeline is using NDK version 23, that's causing the error.

Setting the ndkVersion property in app build.gradle fixed the CI build.

android {
    ...
    ndkVersion "21.4.7075529"
}

Upvotes: 0

Related Questions