Jonathan Peppers
Jonathan Peppers
Usually, it's a crash and your app closes, and there is a Java stacktrace of the missing type.
It looks to me like the inner exception is lost: `The type initializer for 'Microsoft.Maui.Handlers.ButtonHandler' threw an exception.` It doesn't say what the exception was. Hard to know if this...
> You would like me to add new ButtonHandler() somewhere in the app and rerun the app with logcat? If so where should I put the line of code? My...
With a `catch` block, is there an `InnerException`? I would log both `exc.ToString()` and `exc.InnerException` to see if there is any more information.
> -keep class com.microsoft.maui.PlatformInterop { *; } For this rule, we should automatically add it to .NET MAUI. I can look into that. > obj\Release\net8.0-android34.0\android-arm64\proguard\proguard_project_references.cfg : warning XA4304: ProGuard configuration...
They don't have default wildcards for proguard files: https://github.com/dotnet/maui/blob/f6424476e57c1c25cc587f164b90bceb1681cd37/src/Controls/src/Build.Tasks/nuget/buildTransitive/netstandard2.0/Microsoft.Maui.Controls.Globs.props#L43-L55 So, you probably need `
Generally r8 has no idea if C# calls a Java method, so it will remove them otherwise. It doesn't think anyone called it from Java.
The `$(DebuggerSupport)` MSBuild property toggles the `System.Diagnostics.Debugger.IsSupported` trimmer feature flag. We already set this by default in `Release` mode: * https://github.com/dotnet/android/blob/4fdc8014658dc37469fabdf433afd51af09ddc58/src/Xamarin.Android.Build.Tasks/Microsoft.Android.Sdk/targets/Microsoft.Android.Sdk.DefaultProperties.targets#L105 One thing we could do, is solve this issue...
So, are you saying the `ICameraProvider` type is missing? Can you share what NuGet it is from and what namespace it's expected to be in? Thanks!
Did this problem start happening with the recent update: * https://www.nuget.org/packages/Xamarin.AndroidX.Camera.Extensions/1.4.2.2 Or is the problem also there for older versions?