Missing class android.window.OnBackInvokedCallback (referenced from: android.window.OnBackInvokedCallback androidx.activity.OnBackPressedDispatcher.mOnBackInvokedCallback and 4 other contexts)

YouBT 1 Reputation point
2022-12-31T15:05:20.33+00:00

Hello!

I am new with dotnet MAUI, still learning while working. I am trying to build my Android Application, I use my physical Device (Android 6.0 API 23).

If I Debug or make Release the app is compiling and building without any errors and crashes and works on my other physical devices. But if I switch R8 (which I need for publishing in Google Play) it crashes. It couldn`t even load MainPage. Staying in Splash Screen and in Visual Studio 2022 Community edition I can see "Application in break mode".

I can`t fix this issue: Warrning: Missing class android.window.OnBackInvokedCallback (referenced from: android.window.OnBackInvokedCallback androidx.activity.OnBackPressedDispatcher.mOnBackInvokedCallback and 4 other contexts)

I installed latest Nuget packages and

   Xamarin.AndroidX.Activity 1.6.1  
   Xamarin.AndroidX.Activity.Compose"1.6.1  
   Xamarin.AndroidX.Activity.Ktx 1.6.1  
   Xamarin.AndroidX.AppCompat 1.5.1.1  
   Xamarin.AndroidX.Core" 1.9.0.1  
   Xamarin.AndroidX.Legacy.Support.Core.UI" 1.0.0.16  
   Xamarin.AndroidX.Lifecycle.Runtime" 2.5.1.1  
   Xamarin.AndroidX.Navigation.Common 2.5.3  
   Xamarin.AndroidX.Navigation.Runtime 2.5.3  
   Xamarin.AndroidX.Window 1.0.0.10  
   Xamarin.AndroidX.Window.WindowExtensions 1.0.0.10-alpha01  

But I still can`t solve this problem. I searched a lot, but had no luck to find the right solution.

If someone can help, I will be really thankfull!

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
902 questions
Visual Studio Debugging
Visual Studio Debugging
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Debugging: The act or process of detecting, locating, and correcting logical or syntactical errors in a program or malfunctions in hardware. In hardware contexts, the term troubleshoot is the term more frequently used, especially if the problem is major.
696 questions
.NET
.NET
Microsoft Technologies based on the .NET software framework.
624 questions
{count} votes