I've updated to MvvmCross version 4.2.1 from version 4.2.0 via NuGet and now the Android project crashes during startup. An MvxException
is thrown during the splash screen with the message:
MvvmCross.Platform.Exceptions.MvxException: You must call EnsureLoaded on the File plugin before using the DownloadCache
I actually am calling this method in MvxAppCompatSetup.InitializeLastChance
override. This worked well for me with version 4.2.0, but now the code doesn't even hit InitializeLastChance
when running version 4.2.1.
protected override void InitializeLastChance()
{
base.InitializeLastChance();
MvvmCross.Plugins.File.PluginLoader.Instance.EnsureLoaded();
MvvmCross.Plugins.DownloadCache.PluginLoader.Instance.EnsureLoaded();
}
I can't move the EnsureLoaded
calls to InitializeFirstChance
because there I'll get an exception because plugins haven't yet been initialized
Failed to resolve type MvvmCross.Platform.Plugins.IMvxPluginManager
The MvxSetup.InitializePluginFramework
appears to be throwing this exception when InitializePluginFramework
is called.
NuGet displayed error messages for each plugin I have installed during the update:
[Failure] Could not file file '...\Project.Droid\Bootstap\XXXBootstrap.cs'
The files are definitely there and the package installs without reporting an error.
What is the correct way to handle this problem?