I'm developing an Android App with Xamarin using Visual Studio 7.3.2 (build 12) for Mac (based on Mono), thus not using the real thing in Windows. Debugging is very, very inconsistent.
One of the common errors that gets thrown 1 out of 10 times is:
Java.Lang.NoClassDefFoundError has been thrown:
Failed resolution of: Luk/co/chrisjenx/calligraphy/R$attr;
Which I have in my base Activity's AttachBaseContext method:
protected override void AttachBaseContext(Context @base)
{
base.AttachBaseContext(CalligraphyContextWrapper.Wrap(@base));
}
If I stop and re-run, it eventually goes away. I was led to believe that this is because in the background, VS updates packages in the background and it's probably updating the calligraphy package? Is this the case? Why does it come up every once in awhile and is there a way I can permanently get rid of this?
Android manifest has minimum SDK at 24 and target at 26. Project -> Active Configuration is set to Debug. Multi-dex is enabled but I'm not explicitly including it in the Android manifest.
I have 3 emulators: Android Accelerated Nougat x86 API 25 Android 7.1.1, Android ARMv7a Nougat arm API 25 Android 7.1.1, and Nexus 5X x86 API 25 Android 7.1.1 and it's pretty consistent jumping between them.
Additionally, and maybe this is related but I also get this as a common thing:
java.lang.IllegalStateException: AppCompat has already installed itself into the Window
Could this be related? Why do both issues come up very often but go away when I re-start debugging after a few times?