启动App

时间:2015-12-02 10:59:08

标签: ios colors xamarin mvvmcross

我已经在我的Core和iOS项目中安装了Mvvmcross颜色插件的3.5.1版本。当我启动应用程序时,应用程序崩溃并显示错误:

Cirrious.CrossCore.Exceptions.MvxException:找不到类型Cirrious.MvvmCross.Plugins.Color.Touch.Plugin ---&gt;的默认构造函数System.MissingMethodException:找不到类型Cirrious.MvvmCross.Plugins.Color.Touch.Plugin的默认构造函数   在System.RuntimeType.CreateInstanceMono(Boolean nonPublic)[0x00085] /Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono /mcs/class/corlib/ReferenceSources/RuntimeType.cs:105   at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly,Boolean skipCheckThis,Boolean fillCache,System.Threading.StackCrawlMark&amp; stackMark)/ Users / builder / data / lanes / 2356 / 3c0ec355 / source / maccore / _build / Library / Frameworks中的[0x0001a] /Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/corlib/ReferenceSources/RuntimeType.cs:87   at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly,Boolean skipCheckThis,Boolean fillCache,System.Threading.StackCrawlMark&amp; stackMark)/ Users / builder / data / lanes / 2356 / 3c0ec355 / source / maccore / _build / Library / Frameworks中的[0x0002a] /Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/mscorlib/system/rttype.cs:5734   在System.Activator.CreateInstance [T]()&lt; 0x1002ecbe0 + 0x0008f&gt; in:0   在Cirrious.CrossCore.Plugins.MvxLoaderPluginBootstrapAction 2[TPlugin,TPlatformPlugin].<PreLoad>b__0 () [0x00000] in <filename unknown>:0 at Cirrious.CrossCore.Plugins.MvxLoaderPluginManager.FindPlugin (System.Type toLoad) [0x0004d] in <filename unknown>:0 at Cirrious.CrossCore.Plugins.MvxPluginManager.ExceptionWrappedLoadPlugin (System.Type toLoad) [0x00000] in <filename unknown>:0 --- End of inner exception stack trace --- at Cirrious.CrossCore.Plugins.MvxPluginManager.ExceptionWrappedLoadPlugin (System.Type toLoad) [0x00040] in <filename unknown>:0 at Cirrious.CrossCore.Plugins.MvxPluginManager.EnsurePlatformAdaptionLoaded[T] () [0x00021] in <filename unknown>:0 at Cirrious.MvvmCross.Plugins.Color.PluginLoader.EnsureLoaded () [0x00006] in <filename unknown>:0 at Cirrious.CrossCore.Plugins.MvxPluginManager.EnsurePluginLoaded (IMvxPluginLoader pluginLoader) [0x0005e] in <filename unknown>:0 at Cirrious.CrossCore.Plugins.MvxPluginManager.EnsurePluginLoaded (System.Type type) [0x0007f] in <filename unknown>:0 at Cirrious.CrossCore.Plugins.MvxPluginManager.EnsurePluginLoaded[TType] () [0x00000] in <filename unknown>:0 at Cirrious.CrossCore.Plugins.MvxPluginBootstrapAction 1 [TPlugin] .Load(IMvxPluginManager manager)[0x00000] in:0   在Cirrious.CrossCore.Plugins.MvxLoaderPluginBootstrapAction 2[TPlugin,TPlatformPlugin].Load (IMvxPluginManager manager) [0x00007] in <filename unknown>:0 at Cirrious.CrossCore.Plugins.MvxPluginBootstrapAction 1 [TPlugin] .RunAction()[0x00006] in:0   在Cirrious.CrossCore.IoC.MvxSimpleIoCContainer.InternalSetResolver(System.Type tInterface,IResolver resolver)[0x0005c] in:0   在Cirrious.CrossCore.IoC.MvxSimpleIoCContainer.RegisterSingleton(System.Type tInterface,System.Object theObject)[0x00008] in:0   在Cirrious.CrossCore.IoC.MvxSimpleIoCContainer.RegisterSingleton [TInterface](Cirrious.CrossCore.IoC.TInterface theObject)[0x00000] in:0   在Cirrious.CrossCore.Mvx.RegisterSingleton [TInterface](Cirrious.CrossCore.TInterface服务)[0x00006] in:0   在Cirrious.MvvmCross.Platform.MvxSetup.InitializePluginFramework()[0x0001a] in:0   在Cirrious.MvvmCross.Platform.MvxSetup.InitializeSecondary()[0x00068] in:0   在Cirrious.MvvmCross.Platform.MvxSetup.Initialize()[0x00006] in:0   在Orderpad.iOS.AppDelegate.FinishedLaunching(UIKit.UIApplication应用程序,Foundation.NSDictionary launchOptions)[0x00024] /Users/edward.price/Development/source/client/Orderpad.Android/Orderpad.iOS/AppDelegate.cs:32   at at(wrapper managed-to-native)UIKit.UIApplication:UIApplicationMain(int,string [],intptr,intptr)   在UIKit.UIApplication.Main(System.String [] args,IntPtr principal,IntPtr delegate)[0x00005] in /Users/builder/data/lanes/2356/3c0ec355/source/maccore/src/UIKit/UIApplication.cs:77   在/ Users / builder / data / lanes / 2356 / 3c0ec355 / source / maccore / src / UIKit / UIApplication中的UIKit.UIApplication.Main(System.String [] args,System.String principalClassName,System.String delegateClassName)[0x0001c]的.cs:60   在/Users/edward.price/Development/source/client/Orderpad.Android/Orderpad.iOS/Main.cs:12

中的Orderpad.iOS.Application.Main(System.String [] args)[0x00008]

在setup.Initialize();

中失败
    public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions)
    {
        _window = new UIWindow(UIScreen.MainScreen.Bounds);

        var setup = new Setup(this, _window);
        setup.Initialize();

        ApplyTheme();

        var startup = Mvx.Resolve<IMvxAppStart>();
        startup.Start();

        _window.MakeKeyAndVisible();

        return true;
    }

最后一个Mvx调试跟踪是:

为Cirrious.MvvmCross.Plugins.Color.PluginLoader

加载确保插件

任何想法出了什么问题?

1 个答案:

答案 0 :(得分:1)

通过添加:

解决
<assembly fullname="Cirrious.MvvmCross.Plugins.Color.Touch">
      <type fullname="*" />
</assembly>

到Linker.xml