Khanyi
Khanyi

Reputation: 11

Your Android App Bundle has more than 1 certificate chain. Ensure your App Bundle has only 1 certificate chain and try again

I have an Issue when trying to release my Android app to Play store sing Azure pipeline. Below is my yml file,im using Maui .NET8 Thank you.

NB: I have another pipeline that also sign in the other app to same Play store

`- stage: BuildAndroid displayName: Build Android jobs:

I have tried removing the signing in task but still I get an issue.

Upvotes: 1

Views: 364

Answers (1)

SiddheshDesai
SiddheshDesai

Reputation: 8195

Instead of using AndroidSigning@2 task, Use

GooglePlayRelease@4

with the GooglePlayConnectionService and run the pipeline.

Refer the blog here for the details steps.

Install the Official Google play extension in your Azure DevOps account from here:-

After the extension is installed Create a Private key and add an Google Play Azure service connection in Azure DevOps with the same Private key and Google play developer account.

enter image description here

My Azure DevOps yaml pipeline:-

jobs:
- job:
  displayName: 'Build and Publish to Google Play Store'
  pool:
    vmImage: 'windows-latest'

  steps:
  - task: CmdLine@2
    inputs:
      script: 'dotnet workload install maui'

  - task: UseDotNet@2
    displayName: 'Install .NET SDK'
    inputs:
      packageType: sdk
      version: 8.0.x
      installationPath: $(Agent.ToolsDirectory)/dotnet

  - task: JavaToolInstaller@0
    displayName: 'Configure Java version'
    inputs:
      versionSpec: '11'
      jdkArchitectureOption: 'x64'
      jdkSourceOption: 'PreInstalled'

  - task: android-manifest-version@1
    displayName: 'Version Android build'
    inputs:
      sourcePath: 'path/to/AndroidManifest.xml'
      versionCodeOption: 'buildid'
      versionCode: '$(Build.BuildId)'
      versionName: '$(buildVersionPrefix).$(Build.BuildId)'
      versionCodeOffset: '10000'
      printFile: true

  - task: NuGetToolInstaller@1
    displayName: 'Install NuGet tool'

  - task: DotNetCoreCLI@2
    inputs:
      command: 'build'
      projects: '**/*.sln'
      arguments: '-c Release -f net8.0-android'

  - task: CopyFiles@2
    displayName: 'Copy AAB to artifacts directory'
    inputs:
      SourceFolder: '$(System.DefaultWorkingDirectory)/YourMauiProject/bin/Release/net8.0-android/'
      Contents: '*.aab'
      TargetFolder: '$(Build.ArtifactStagingDirectory)'

  - task: PublishBuildArtifacts@1
    displayName: 'Publish Artifact: drop'
    inputs:
      PathtoPublish: '$(Build.ArtifactStagingDirectory)'
      ArtifactName: 'drop'
      publishLocation: 'Container'

  - task: GooglePlayRelease@4
    displayName: 'Publish to Google Play Store'
    inputs:
      serviceConnection: 'GooglePlayConnectionService'
      applicationId: 'com.yourcompany.yourapp'
      action: 'SingleBundle'
      bundleFile: '$(Build.ArtifactStagingDirectory)/**/*.aab' # Adjust the path accordingly
      track: 'internal'

The Pipeline worked without GooglePlayRelease@4 task too.

Reference Github issue

Upvotes: 1

Related Questions