Visual Studio XAML Hot Reload on Android causes "The application may be doing too much work on its main thread."

Viewed 22

I am using Visual Studio Community Edition Version 17.3.4 to develop a Xamarin app for Android.

When I start the app in debug mode on the emulator or a physical device it runs fine, but as soon as I make an edit in the XAML file and hot reload kicks in, Android starts reporting

[Choreographer] Skipped x frames! The application may be doing too much work on its main thread.

and then goes extremely slow. To recover, I have to stop the app and restart the debug session.

Anybody know how I can solve this? Thank you.

1 Answers

You can implement async tasks in your code using async-await Task.Run.

For more details, you can refer to the following docs: Task.Run Method | Microsoft Docs

Related