Android Apk not installed

Kalyan A 335 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.

Blazor
Blazor
A free and open-source web framework that enables developers to create web apps using C# and HTML being developed by Microsoft.
1,636 questions
.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
3,763 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Leon Lu (Shanghai Wicresoft Co,.Ltd.) 77,726 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.

    0 comments No comments

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.