gpt4 book ai didi

ios - 启动 App 时 Mvvmcross 颜色插件抛出错误

转载 作者:行者123 更新时间:2023-11-29 01:25:48 25 4
gpt4 key购买 nike

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

Cirrious.CrossCore.Exceptions.MvxException:找不到 Cirrious.MvvmCross.Plugins.Color.Touch.Plugin 类型的默认构造函数 ---> System.MissingMethodException:找不到 Cirrious.MvvmCross.Plugins.Color 类型的默认构造函数。触控插件 在 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 在 System.RuntimeType.CreateInstanceSlow (Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, System.Threading.StackCrawlMark& stackMark) [0x0001a] 在/Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/corlib/ReferenceSources/RuntimeType.cs:87 在 System.RuntimeType.CreateInstanceDefaultCtor (Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, System.Threading.StackCrawlMark& stackMark) [0x0002a] 在/Users/builder/data/lanes/2356/3c0ec355/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/mscorlib/system/rttype.cs:5734 在 System.Activator.CreateInstance[T] () <0x1002ecbe0 + 0x0008f> 中: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 管理器)[0x00000] 在: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 解析器)[0x0005c] 在:0 在 Cirrious.CrossCore.IoC.MvxSimpleIoCContainer.RegisterSingleton(System.Type tInterface,System.Object theObject)[0x00008] 中:0 在 Cirrious.CrossCore.IoC.MvxSimpleIoCContainer.RegisterSingleton[TInterface] (Cirrious.CrossCore.IoC.TInterface theObject) [0x00000] 在 :0 在 Cirrious.CrossCore.Mvx.RegisterSingleton[TInterface](Cirrious.CrossCore.TInterface 服务)[0x00006] 中:0 在 Cirrious.MvvmCross.Platform.MvxSetup.InitializePluginFramework () [0x0001a] 中:0 在 Cirrious.MvvmCross.Platform.MvxSetup.InitializeSecondary () [0x00068] 中:0 在 Cirrious.MvvmCross.Platform.MvxSetup.Initialize () [0x00006] 中:0 在 Orderpad.iOS.AppDelegate.FinishedLaunching (UIKit.UIApplication application, Foundation.NSDictionary launchOptions) [0x00024] 在/Users/edward.price/Development/source/client/Orderpad.Android/Orderpad.iOS/AppDelegate.cs:32 在(包装管理到 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 在 UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x0001c] 在/Users/builder/data/lanes/2356/3c0ec355/source/maccore/src/UIKit/UIApplication .cs:60 在 Orderpad.iOS.Application.Main (System.String[] args) [0x00008] 在/Users/edward.price/Development/source/client/Orderpad.Android/Orderpad.iOS/Main.cs:12

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 加载插件

知道哪里出了问题吗?

最佳答案

通过添加解决:

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

到 Linker.xml

关于ios - 启动 App 时 Mvvmcross 颜色插件抛出错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34041046/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com