通过 Azure android 签名构建管道对其进行签名后,.apk 文件输出在哪里? [英] Where is the .apk file output after signing it via Azure android signing build pipeline?

查看:26
本文介绍了通过 Azure android 签名构建管道对其进行签名后,.apk 文件输出在哪里?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 AzureAndroid 签名"任务在构建管道中对 apk 文件进行签名,但我看不到已签名的 apk 输出到的路径.我已将构建管道的整个根目录导出为 .zip 文件,但已签名的 .apk 文件不存在.更令人困惑的是,Android 签名任务正在通过,所以签名的 .apk 一定在正确的地方?问题是在哪里!

谢谢

解决方案

Android Signing' 任务没有创建新的 apk.签名后的 apk 仍在 android 构建任务的输出文件夹中.如果您使用 XamarinAndroid 任务来构建您的 apk..apk 将输出到 $(Build.ArtifactStagingDirectory),例如:检查

您可以运行以下命令来检查从 azure 服务器下载的 apk 是否已签名.

$ jarsigner -verify -verbose -certs my_application.apk

I'm signing an apk file in a build pipeline using the Azure 'Android Signing' task but I cannot see the path in which the signed apk is output to. I've exported the entire root of the build pipeline as .zip file, but a signed .apk file does not exist. What's even more confusing is that the Android Signing task is passing, so the signed .apk must be somewhere right? The question is where!

Thanks

解决方案

Android Signing' task did not create a new apk. The signed apk is still in the output folder of android build task. If you use XamarinAndroid task to build your apk. The .apk will be output to $(Build.ArtifactStagingDirectory) for below example: Check here for all predefined variables

- task: XamarinAndroid@1
  inputs:
    projectFile: '**/*droid*.csproj'
    outputDirectory: '$(Build.ArtifactStagingDirectory)'
    configuration: '$(buildConfiguration)'

Then you can add the android sign task and point apkFiles to $(Build.ArtifactStagingDirectory)/*.apk for below example:

- task: AndroidSigning@3
  inputs:
    apksign: true
    zipalign: false
    apksignerKeystoreFile: levi.keystore
    apkFiles: '$(Build.ArtifactStagingDirectory)/*.apk'
    keystoreAlias: levi
    apksignerKeyPassword: '**'
    apksignerKeystorePassword: '**'

You can then add a publish artifacts task to publish your apk to azure server,where you can download from azure devops build summary UI when your build is complete.

- task: PublishBuildArtifacts@1
  inputs:
    pathtoPublish: '$(Build.ArtifactStagingDirectory)'.

Then you can download the apk from your build summary page.

You can run below command to check if the apk is signed or not after you downloaded it from azure server.

$ jarsigner -verify -verbose -certs my_application.apk

这篇关于通过 Azure android 签名构建管道对其进行签名后,.apk 文件输出在哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆