Skip to content

Add Fragment.OnCreateAnimation(int32, bool, int32) to the list that saves us from a System.Reflection.Emit call #7212

@PureWeen

Description

@PureWeen

Android application type

.NET 7.0 MAUI
Android for .NET (net7.0-android)

Affected platform version

.NET 7

Description

I'm currently generating the AOT Profiles for non shell apps in .NET MAUI

There's one place where it's currently falling back to System.Reflection.Emit

https://github.com/dotnet/maui/blob/0062faeba1dd391b1468798cd29299403b9b67f0/src/Core/src/Platform/Android/Navigation/NavigationViewFragment.cs#L88

2022-07-25 11:25:06.254 14932-14932/? D/monodroid-assembly: Falling back to System.Reflection.Emit for delegate type '_JniMarshal_PPIZI_L': IntPtr n_OnCreateAnimation_IZI(IntPtr, IntPtr, Int32, Boolean, Int32)

We only need these changes for NET7

Steps to Reproduce

If you run the following project ShellVsNonShell.zip

with the following logging enabled then you should see it popup in logcat

adb shell setprop debug.mono.log default,assembly,mono_log_level=debug,mono_log_mask=all

You might also see one around OnPageScrolled that's ok to ignore. We have a fix in the MAUI repository to remove this code path.

Did you find any workaround?

No response

Relevant log output

2022-07-25 11:25:06.254 14932-14932/? D/monodroid-assembly: Falling back to System.Reflection.Emit for delegate type '_JniMarshal_PPIZI_L': IntPtr n_OnCreateAnimation_IZI(IntPtr, IntPtr, Int32, Boolean, Int32)

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions