Android Apk not installed

Kalyan A 355 Reputation points
2024-12-23T21:42:31.97+00:00

dotnet publish -f:net9.0-android -c:Release /p:AndroidSigningKeyPass=math@24 /p:AndroidSigningStorePass=math@24

When I try to install apk file "on my Android phone I get below error

"App not installed as app isnt compatible with your phone"

I used VS2022 latest version.

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
3,768 questions
{count} votes

Accepted answer
  1. Leon Lu (Shanghai Wicresoft Co,.Ltd.) 77,806 Reputation points Microsoft Vendor
    2024-12-25T03:03:55.3866667+00:00

    .I shall change to 12 and try

    No.

    Firstly, please add Exported =true in the your [Activity] tag of MainActivity.cs, then rebuild your application.

      [Activity(Theme = "@style/Maui.SplashTheme", MainLauncher = true, Exported =true....)]
        public class MainActivity : MauiAppCompatActivity
        {
        }
    

    After releasing your application, please open ~\MauiBlazorApp\bin\Release\net9.0-android folder, find the apk name that end of "-Signed.apk" like com.companyname.mauiblazorapp-Signed.apk. Install this apk in your devices.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.