Reputation: 11
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
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
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
Reputation: 1
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
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