c# android 全局捕获未处理异常
[Application] public class MyApp : Application { public MyApp(IntPtr javaReference, JniHandleOwnership transfer) : base(javaReference, transfer) { } public override void OnCreate() { base.OnCreate(); AndroidEnvironment.UnhandledExceptionRaiser += MyApp_UnhandledExceptionHandler; } void MyApp_UnhandledExceptionHandler(object sender, RaiseThrowableEventArgs e) { } protected override void Dispose(bool disposing) { AndroidEnvironment.UnhandledExceptionRaiser -= MyApp_UnhandledExceptionHandler; base.Dispose(disposing); } }
桂棹兮兰桨,击空明兮溯流光。