[Bug] .NET MAUI Blazor App crashed on physical device
See original GitHub issueDescription
If I build empty .NET MAUI Blazor App (Preview) VS template with command dotnet build -f net6.0-android -c Release and then install .apk file into one of the physical Android 10 Phone and then run it, it always crash after startup.
So the point is that I want to create .apk for my Blazor MAUI project, which could be send to some phones to test it.
If I try same process with empty .NET MAUI App (Preview) and same command dotnet build -f net6.0-android -c Release it works well on physical Android Phone.
I think there is a problem with some Blazor component or something. Because of that I try to clear all blazor stuff (script include blazor.webview.js etc.) inside index.html file and leave only this inside it:
<!DOCTYPE html>
<html>
<head>
</head>
<body>
Živjo!
</body>
</html>
But this doesn’t help. Screen attached below is shown just for one second and then app crashed.
Steps to Reproduce
- Create default .NET MAUI Blazor App Visual Studio template
- run command dotnet build -f net6.0-android -c Release
- Copy .apk from “bin/Release/net6.0-android” folder
- install it into some physical Android phone
- run it
Expected Behavior
Run without problem like .NET MAUI App template.
Actual Behavior
App is crashing all time.
Basic Information
- Version with issue: MAUI P9
- Last known good version:
- IDE: VS 2022 P6
- Platform Target Frameworks:
- Android: API 29
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (3 by maintainers)
@aokocax you save my day!!! 😃
I also added just
<AndroidLinkMode>None</AndroidLinkMode>
and it works like a charm on release mode on physical Android phone 😃So that case could be closed.
Hello https://github.com/dotnet/maui/issues/2246#issuecomment-942080171