I encountered this during error during a compilation of one of my Xamarin Android apps. After installation of a new 3rd party library, I tried compiling my project, but BOOM! this happened!
What happened ?
So I took a little look-around. Well my project solution is a multi-hierarchical project, where as I have an Android Library, Core Library, and Client Project App referenced in a hierarchical manner .
So what has happened was, after some third party library installation, a duplicate MainApplication class had been generated somehow. 😮
Remove the duplicate MainApplication class in your project, hence Android requires only one point to fire up. 😉
Make sure you don’t have duplicate MainApplication classes that derives from Application base class in your Xamarin.Android project. Specially if you have a hierarchical project implementation, such as a Android Library project attached to your Main application project.
In such cases make sure you maintain only one MainApplication class that derives from Application base class, in either of your projects. 😀