Search code examples
c#azuremauiazure-pipelines-yaml

Azure pipeline stopped giving installable MAUI app


I have an Azure pipeline which has been building my MAUI app fine but a few weeks ago a problem occured. After the app is built and deployed for user download (in a custom online location, not the Google Play store), I try to install it manually on my few phones and every time it just says "Application cannot be installed", without any specific error details.

Interestingly enough, when I 'run dotnet build MyApp.sln -c Release' on my local machine, in the source folder, it builds the app just fine and I can then install it on all the phones without problems.

I have tried adding a signing step in the Azure pipeline and it seems to be working but the output apk still won't install on phones.

The YAML code I added for signing the app (which didn't help):

- task: AndroidSigning@3
  displayName: 'Signing and aligning APK file(s) **/*.apk'
  inputs:
    apkFiles: '**/*.apk'
    apksign: true
    apksignerKeystoreFile: myappkey.keystore
    apksignerKeystorePassword: mypass
    apksignerKeystoreAlias: myappkey
    apksignerKeyPassword: mypass

Any idea what I might be missing?


Solution

  • Turns out I was looking for the solution in the wrong place as it wasn't a problem with the YAML config.

    I installed the app using android-adb to be able to see the logs and the exact error message. It turned out that I was trying to install a build generated by a different source (Azure instead of local machine) and needed to manually uninstall the old app first for that (Android won't do it automatically).

    If I keep installing new versions of the app built on the same machine, I don't get the error anymore.