Comments (18)
Hi I'm an AI powered bot that finds similar issues based off the issue title.
Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!
Closed similar issues:
- Android Release Mode app crash during startup (#12165), similarity score: 0.80
- App crashes only in release mode and only when using AOT (#8337), similarity score: 0.76
- Fatal signal 6 (SIGABRT) crash on android release when forcing screen orientation (#22106), similarity score: 0.72
- Cannot start the application without starting it in debugging. (#13445), similarity score: 0.71
Note: You can give me feedback by thumbs upping or thumbs downing this comment.
from maui.
You could comment on dotnet/runtime#103975 and ask if it is going back to .NET 8.
from maui.
Hi,
The AOT stuff is pretty glitched, try adding
<RunAOTCompilation>False</RunAOTCompilation>
to your .csproj for Android release builds, e.g.
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net8.0-android|AnyCPU'">
<RunAOTCompilation>False</RunAOTCompilation>
</PropertyGroup>
from maui.
Hi,
The AOT stuff is pretty glitched, try adding
<RunAOTCompilation>False</RunAOTCompilation>
to your .csproj for Android release builds, e.g.
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net8.0-android|AnyCPU'"> <RunAOTCompilation>False</RunAOTCompilation> </PropertyGroup>
The problem is, I need aot, I've waited to update to maui from Xamarin, since IL stripping didn't work on maui and with .net 8 they've added support
from maui.
Just tried without AOT and still crashes
from maui.
Maybe it's not AOT then - but you mentioned IL stripping - maybe something there is being too aggressive? Maybe post your settings w.r.t. any IL stripping that's taking place.
from maui.
it was a combination of and IL stripping, is there a way to control IL removing?
from maui.
I'm encountering the same issue; disabling AOT didn't resolve it. I urgently need to create a release build. Is there a workaround available?
from maui.
It appears that dependency injection fails to work as expected in release mode; it crashes when a parameterless constructor is absent.
from maui.
It appears that dependency injection fails to work as expected in release mode; it crashes when a parameterless constructor is absent.
Have you figured out a workaround?
from maui.
@jonathanpeppers thoughts?
from maui.
In the end, the error was due to an incorrect definition in my XAML. The issue was that the actual error wasn't displayed anywhere. Correcting the XAML resolved the issue with Dependency Injection.
from maui.
There is a lack of information here, to know what went wrong.
@gabriel-kozma said:
it was a combination of and IL stripping, is there a way to control IL removing?
What was the setting that worked vs didn't work?
There is an issue related to the experimental $(AndroidStripILAfterAOT)
setting, that should be fixed in .NET 9 now:
from maui.
hi @jonathanpeppers just using IL stripping causes the app to crash, I could try the .net 9, but I would need to wait for production to release it?
Can this be back ported to .net 8?
I'll try here and report back
from maui.
Thank you @jonathanpeppers is there a way for me to add more logging in order to figure out how is breaking?
from maui.
I followed what @wagenheimer said and started looking, I'm not using XAML anymore, but I've had some code comments with the Xamarin.Forms xaml and it was this that was causing the problem with IL Stripping
another question I have @jonathanpeppers is were the empty dlls are stored on the release application? In xamarin they were stored at a file monodroidbundle which cointaned all dlls and I could verify that they were indeed stripped of their IL
from maui.
On Android, .NET assemblies are compressed into a single file that can be mmap
'd in one call.
You can use either of these tools to inspect or pull them out of an .apk
:
- https://github.com/dotnet/android/tree/main/tools/decompress-assemblies
- https://github.com/dotnet/android/tree/main/tools/assembly-store-reader
from maui.
Is this issue good to close now? Thanks!
from maui.
Related Issues (20)
- [MAUI]I9_Scrolling with no jitter-The Static and Dynamic Height pages cannot be scrolled. HOT 1
- [MAUI]I8_Header and Footer(Add Clear) - When added to items 4, the footer will disappear. HOT 1
- [MAUI] I6_Grouping_VerticalItemSpacing page When the window is reduced in size, the Small &Big &Awesome strings are displayed repeatedly. HOT 1
- [MAUI]I1_Layout-Vertical list and Grid content cannot adapt when the window is reduced HOT 1
- [MAUI]I3_Specific item sizing - The page layout after horizontal rotation should not be close. HOT 1
- [MAUI]I1_Layout - The content of the long text items overlaps. HOT 1
- Using Label's Style in ContentPage.Resources or not, it makes different appearance HOT 3
- [MAUI] I6_Grouping_VerticalItemSpacing :Grouped CollectionView have extra space HOT 1
- XamlC XC0045 on Reference Bindings pointed to XAML HOT 3
- Android compatibility tests broken on net.9 HOT 2
- [Android] CarouselView + CollectionView performance issues HOT 4
- [MAUI] `File.Designer.cs` is not generated for `File.resx` placed in MAUI Library HOT 2
- Shell Tabs on Android are sometimes not visually removed from view when IsVisible is set to false. HOT 4
- "FileSystem" doesn't work on .net maui 9 preview blazor hybrid "Web App" project HOT 4
- FlyoutItemIsVisible doesn't work for nested content HOT 1
- [Windows][Bug] Shell shows as blank screen when returning from another page HOT 3
- [iOS, 9.0 Preview 6] SkiaSharp 3.0 Preview 4.1 has a severe memory leak on iOS HOT 2
- Screenshots taken using IScreenshot.CaptureAsync don't include popups or visible alerts HOT 2
- Android Tabbar, clicking 4th tab opens the 5th tab HOT 1
- Scrollviews inside Grids come up faulty in screenshots HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from maui.