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

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

问题描述

我正在使用Azure'Android Signing'任务在构建管道中对apk文件进行签名,但是我看不到将签名的apk输出到的路径.我已经将构建管道的整个根导出为.zip文件,但是不存在签名的.apk文件.更令人困惑的是,Android Signing任务是 passing ,因此已签名的.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!

谢谢

推荐答案

Android签名"任务未创建新的APK.签名的apk仍然在android build任务的输出文件夹中. 如果您使用XamarinAndroid任务来构建您的apk.对于以下示例,.apk将输出到$(Build.ArtifactStagingDirectory):检查

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)'

然后,您可以添加android sign任务,并将apkFiles指向$(Build.ArtifactStagingDirectory)/*.apk,例如以下示例:

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: '**'

然后,您可以添加一个发布工件任务,以将apk发布到azure服务器,在构建完成后,您可以在其中从azure devops构建摘要UI下载.

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)'.

然后,您可以从构建摘要页面下载apk.

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

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

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天全站免登陆