We are working with mono droid and mvvmcross and sometimes when the app is initializing we experience a exception- Cirrious.MvvmCross.Exceptions.MvxException: Unable to Resolve IoC type.
It happens when we do a call to GetService() –
public IImageService ImageService
{
get
{
if (_imageService == null)
{
_imageService = this.GetService<IImageService>();
}
return _imageService;
}
}
It seems that it cannot resolve IImageService – Do you guys have any ideas what can cause this and to avoid it?
Regards
The exception ‘Cirrious.MvvmCross.Exceptions.MvxException: Unable to Resolve IoC type.’ suggests that the
IImageServiceimplementation cannot be found in the IoC container.This normally suggests that an implementation for the interface hasn’t been registered with the IoC framework before the call to
GetService<>.Some questions that might help work out why this is happening:
GetService<>call is made?