Hi Team,
I am currently working in Azure DevOps, and xamarin android application development.
I am able to create build pipeline and build android source successfully. but when I try to sign my android apk I am facing challenges to give android keystore file.
Note: I have placed my keystore file in my project android source code and main source code path as well. now i really don't know how to specify this keystore file path in my pipeline.yml file. Below is my yml content.
_# Xamarin.Android
pool:
vmImage: 'macOS 10.13'
variables:
buildConfiguration: 'Release'
outputDirectory: '$(build.binariesDirectory)/$(buildConfiguration)'
steps:
task: NuGetCommand@2
inputs:
restoreSolution: '*/.sln'
task: XamarinAndroid@1
inputs:
projectFile: '*/droid*.csproj'
outputDirectory: '$(outputDirectory)'
configuration: '$(buildConfiguration)'
task: AndroidSigning@3
inputs:
apkFiles: '$(outputDirectory)/*.apk'
apksign: true
apksignerKeystoreFile: '$(build.sourcesDirectory)/pockeystore.keystore'
apksignerKeystorePassword: 'pockeystore'
apksignerKeyPassword: 'pockeystore'
zipalign: false
task: PublishBuildArtifacts@1
inputs:
pathtoPublish: '$(outputDirectory)'_
Please help me to setup keystore file path.
Joy
Innovation Lead
⚠Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
I have upload my android keystore file in Library-> SecureFiles Section. Then i try to use it in Build Task but its showing error message Job Job1: Step input secureFile references secure file pockeystore.keystore which could not be found. The secure file does not exist or has not been authorized for use. For authorization details, refer to https://aka.ms/yamlauthz.
My Yaml script is:
pool:
vmImage: 'macOS 10.13'
variables:
buildConfiguration: 'Release'
outputDirectory: '$(build.binariesDirectory)/$(buildConfiguration)'
steps:
task: NuGetCommand@2
inputs:
restoreSolution: '*/.sln'
task: XamarinAndroid@1
inputs:
projectFile: '*/droid*.csproj'
outputDirectory: '$(outputDirectory)'
configuration: '$(buildConfiguration)'
task: DownloadSecureFile@1
inputs:
secureFile: 'pockeystore.keystore'
task: AndroidSigning@3
inputs:
apkFiles: '$(outputDirectory)/*.apk'
apksign: false
zipalign: false
task: PublishBuildArtifacts@1
inputs:
pathtoPublish: '$(outputDirectory)'
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Keep-alive
@joychandru thank you for reporting this and apologies for the confusion. The Android Signing docs have been updated to address this and will be live within a couple of days. If you still face the problem that the secure file "has not be authorized for use", please visit https://aka.ms/yamlauthz or click on the secure file and set it to be authorized for use by all pipelines:

Hi @davidstaheli !
I have a similar issue, where the builds are (I think) not being signed. I checked "Pipeline permissions" on the "Secure files" tab, and tried turning it on. But it is always turned back to off.
Strangely, when I change the setting, the "Save"-button (can be seen in your screenshot) does not turn on. This is even though I am the administrator of my project (since I created it).
Do you experience the same issue?
Hi @davidstaheli !
I have a similar issue, where the builds are (I think) not being signed. I checked "Pipeline permissions" on the "Secure files" tab, and tried turning it on. But it is always turned back to off.
Strangely, when I change the setting, the "Save"-button (can be seen in your screenshot) does not turn on. This is even though I am the administrator of my project (since I created it).
Do you experience the same issue?
I'm also experiencing the same issue, even though I have turned on the pipeline permission.
Although this works when I use the classical mode for signing the apk.


Most helpful comment
I'm also experiencing the same issue, even though I have turned on the pipeline permission.

Although this works when I use the classical mode for signing the apk.