I'm new to xamarin and mobile development and am having a really hard time deploying my app to an actual device. Every time I try to install on anything but an emulator, I get an App not installed error. I've spent a lot of time going over similar questions/issues online, but none of them have helped or at least I haven't been able to apply them to my situation successfully since the vast majority seem to apply to working in android studio and building the apk manually.
I'm using xamarin.forms in VS 2019, and then am using an ADO pipeline to build and sign the .apk file. From my pipeline's perspective, things seem to be working okay. The Signing step supposedly signs and verifies successfully, but trying to debug the .apk file in android studio I get the following errors:
Installation did not succeed.
The application could not be installed: INSTALL_PARSE_FAILED_NO_CERTIFICATES
and APK signature verification failed.
Running the command apksigner verify --print-certs <myapkfile>.apk, I get the following error:
DOES NOT VERIFY
ERROR: Missing META-INF/MANIFEST.MF
I'm unsure why my signed apk still fails with those errors and based off the guide for signing I don't see anything I'm missing.
Configuration
My Target android version is Android 10.0 (API Level 29) and the tasks in my ADO .yaml pipeline are configured as follows:
- task: XamarinAndroid@1
inputs:
projectFile: '**/*Droid*.csproj'
outputDirectory: $(Build.ArtifactStagingDirectory)
configuration: '$(buildConfiguration)'
createAppPackage: true
jdkOption: 'JDKVersion'
- task: AndroidSigning@3
inputs:
apkFiles: '**/*.apk'
apksign: true
apksignerKeystoreAlias: OnDeck
apksignerKeystoreFile: 'release.keystore'
apksignerKeystorePassword: $(CredentialPassword)
apksignerKeyPassword: $(CredentialPassword)
I feel like its got to be some really minor thing I'm missing, but I just cannot figure it out. Any help is greatly appreciated.