No runtime exception.
[System.MethodAccessException]: Method `Microsoft.Maui.Platform.ViewExtensions.GetParentOfType[Android.Views.ViewGroup](Android.Views.View)' is inaccessible from method `CommunityToolkit.Maui.Behaviors.TouchBehavior.OnAttachedTo(Microsoft.Maui.Controls.VisualElement,Android.Views.View)'
at CommunityToolkit.Maui.Behaviors.TouchBehavior.OnAttachedTo + 0x16(Unknown Source)
at Microsoft.Maui.Controls.PlatformBehavior`2[[Microsoft.Maui.Controls.VisualElement, Microsoft.Maui.Controls, Version=10.0.0.0, Culture=neutral, PublicKeyToken=null],[Android.Views.View, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065]].OnLoaded + 0x37(Unknown Source)
- .NET MAUI CommunityToolkit: 14.0.0
- OS: android
- .NET MAUI: 10.0.40-ci.main.26111.16
Is there an existing issue for this?
Did you read the "Reporting a bug" section on Contributing file?
Current Behavior
TouchBehaviorthrows aSystem.MethodAccessExceptionat runtime when running against the latestdotnet/maui(9.0.40).Probably because
TouchBehavior.android.cscalls theinternalmethodMicrosoft.Maui.Platform.ViewExtensions.GetParentOfType<T>(), butdotnet/mauiremoved theInternalsVisibleToattribute forCommunityToolkitassemblies in PR dotnet/maui#33442.Expected Behavior
No runtime exception.
Stack trace
Environment