5

我正在通过 CrittercismIOS 集成崩溃报告,并且我在 Xamarin 组件商店中使用过组件

https://components.xamarin.com/view/crittercism

但应用程序崩溃并报告错误。

2015-11-25 10:49:50.621 MyApp[40227:2065265] critical: Stacktrace:

2015-11-25 10:49:50.621 MyApp[40227:2065265] critical:   at <unknown> <0xffffffff>
2015-11-25 10:49:50.621 MyApp[40227:2065265] critical:   at System.Reflection.MonoCMethod.InternalInvoke (object,object[]) [0x00016] in /Users/builder/data/lanes/2356/9ce9e8b9/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/corlib/System.Reflection/MonoMethod.cs:650
2015-11-25 10:49:50.621 MyApp[40227:2065265] critical:   at System.RuntimeType.CreateInstanceMono (bool) [0x000ca] in /Users/builder/data/lanes/2356/9ce9e8b9/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/corlib/ReferenceSources/RuntimeType.cs:113
2015-11-25 10:49:50.622 MyApp[40227:2065265] critical:   at System.RuntimeType.CreateInstanceSlow (bool,bool,bool,System.Threading.StackCrawlMark&) [0x0001a] in /Users/builder/data/lanes/2356/9ce9e8b9/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/corlib/ReferenceSources/RuntimeType.cs:87
2015-11-25 10:49:50.622 MyApp[40227:2065265] critical:   at System.RuntimeType.CreateInstanceDefaultCtor (bool,bool,bool,System.Threading.StackCrawlMark&) [0x0002a] in /Users/builder/data/lanes/2356/9ce9e8b9/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/mscorlib/system/rttype.cs:5734
2015-11-25 10:49:50.622 MyApp[40227:2065265] critical:   at System.Activator.CreateInstance (System.Type,bool) [0x00040] in /Users/builder/data/lanes/2356/9ce9e8b9/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/mscorlib/system/activator.cs:214
2015-11-25 10:49:50.622 MyApp[40227:2065265] critical:   at System.Activator.CreateInstance (System.Type) [0x00000] in /Users/builder/data/lanes/2356/9ce9e8b9/source/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/external/referencesource/mscorlib/system/activator.cs:147
2015-11-25 10:49:50.622 MyApp[40227:2065265] critical:   at Cirrious.MvvmCross.Touch.Views.MvxTouchViewsContainer.CreateViewOfType (System.Type,Cirrious.MvvmCross.ViewModels.MvxViewModelRequest) <IL 0x00077, 0x002fb>
2015-11-25 10:49:50.622 MyApp[40227:2065265] critical:   at Cirrious.MvvmCross.Touch.Views.MvxTouchViewsContainer.CreateView (Cirrious.MvvmCross.ViewModels.MvxViewModelRequest) <IL 0x0003e, 0x0018f>
2015-11-25 10:49:50.623 MyApp[40227:2065265] critical:   at Cirrious.MvvmCross.Touch.Views.MvxCanCreateTouchViewExtensionMethods.CreateViewControllerFor (Cirrious.MvvmCross.Touch.Views.IMvxCanCreateTouchView,Cirrious.MvvmCross.ViewModels.MvxViewModelRequest) <IL 0x00007, 0x0004a>
2015-11-25 10:49:50.623 MyApp[40227:2065265] critical:   at Cirrious.MvvmCross.Touch.Views.Presenters.MvxTouchViewPresenter.Show (Cirrious.MvvmCross.ViewModels.MvxViewModelRequest) <IL 0x00003, 0x00037>
2015-11-25 10:49:50.623 MyApp[40227:2065265] critical:   at Cirrious.MvvmCross.Touch.Views.MvxTouchViewDispatcher/<>c__DisplayClass4.<ShowViewModel>b__3 () <IL 0x00028, 0x00090>
2015-11-25 10:49:50.623 MyApp[40227:2065265] critical:   at Cirrious.MvvmCross.Touch.Views.MvxTouchUIThreadDispatcher.RequestMainThreadAction (System.Action) <IL 0x00028, 0x000e8>
2015-11-25 10:49:50.623 MyApp[40227:2065265] critical:   at Cirrious.MvvmCross.Touch.Views.MvxTouchViewDispatcher.ShowViewModel (Cirrious.MvvmCross.ViewModels.MvxViewModelRequest) <IL 0x00024, 0x0015b>
2015-11-25 10:49:50.623 MyApp[40227:2065265] critical:   at Cirrious.MvvmCross.ViewModels.MvxNavigatingObject.ShowViewModelImpl (System.Type,Cirrious.MvvmCross.ViewModels.IMvxBundle,Cirrious.MvvmCross.ViewModels.IMvxBundle,Cirrious.MvvmCross.ViewModels.MvxRequestedBy) <IL 0x00030, 0x00145>
2015-11-25 10:49:50.623 MyApp[40227:2065265] critical:   at Cirrious.MvvmCross.ViewModels.MvxNavigatingObject.ShowViewModel (System.Type,Cirrious.MvvmCross.ViewModels.IMvxBundle,Cirrious.MvvmCross.ViewModels.IMvxBundle,Cirrious.MvvmCross.ViewModels.MvxRequestedBy) <IL 0x00006, 0x0004f>
2015-11-25 10:49:50.624 MyApp[40227:2065265] critical:   at Cirrious.MvvmCross.ViewModels.MvxNavigatingObject.ShowViewModel<T_REF> (Cirrious.MvvmCross.ViewModels.IMvxBundle,Cirrious.MvvmCross.ViewModels.IMvxBundle,Cirrious.MvvmCross.ViewModels.MvxRequestedBy) <IL 0x0000e, 0x0005b>

Xamarin 组件存储上的 MvvmCross 版本是 3.5.1 和 Crittercism 2.4。

如果我在 FinishedLaunching 中删除此代码

CrittercismIOS.Crittercism.Init("00ac4950703d418c9cef9b7818cc307300444503");

应用程序运行良好(它也适用于 Xamarin.Insight,但不能同时使用这两个 dll)。

4

2 回答 2

0

2.5版解决了这个问题

https://components.xamarin.com/view/crittercism

于 2016-03-07T11:22:38.977 回答
-1

对于 MvvmCross,您应该将 Crittercism 初始化放在您的Setup.cs类中。

public Setup(Context applicationContext) : base(applicationContext)
{
    Crittercism.Init (applicationContext, "YOUR APP ID GOES HERE");
}

Crittercism Xamarin 文档中提供的设置说明假设您将代码放在从 Android Activity 继承的类中。对于 MvvmCross,这不适用。您需要将初始化放在您的 Setup 方法中,而不是如上所示。

于 2016-02-18T23:13:47.287 回答