A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
Hello @Stewart Basterash ,
Thanks for your question.
Newer Android phones have a strict rule: a specific file inside your app must not be compressed. The "Archive and Distribute" menu in Visual Studio has a bug where it compresses this file by mistake. When the phone sees the compressed file, it rejects it and says "App Not Installed". The local emulator ignores this rule, which is why it worked there.
Please refer to these following workarounds:
- Direct USB install.
- Plug your Android test phone into your computer using a USB cable.
- At the top of Visual Studio, change the build mode from "Debug" to "Release".
- Select your physical phone from the green Play button drop-down and click it to deploy directly.
- Command Line Build
Open a Command Prompt in your app's folder and type the command below. This uses the core builder that does not have the compression bug:
dotnet publish -f net10.0-android -c Release -p:AndroidKeyStore=true -p:AndroidSigningKeyStore="C:\path\to\your.keystore" -p:AndroidSigningKeyAlias="your_alias" -p:AndroidSigningStorePass="your_password" -p:AndroidSigningKeyPass="your_password"
Please try and let me know if it works. I'd be happy to investigate further if needed.
I hope this addresses your question. If this response was helpful, please consider following the guidance to provide feedback. Thank you.