按下后退按钮后混合Web视图崩溃(Android)

时间:2015-05-07 08:03:52

标签: xamarin.android xamarin.forms xlabs

我正在使用HybridWebView,每当我尝试按下Android硬件按钮时,应用程序崩溃,当我按下操作栏时,会执行预期的后退操作。

关于类似问题还有一个open issue on Git Hub,还没有任何修复。

这是我的堆栈跟踪:

at mono.java.lang.RunnableImplementor.n_run(Native method)  
at mono.java.lang.RunnableImplementor.run(RunnableImplementor.java:29)  
at android.os.Handler.handleCallback(Handler.java:739)  
at android.os.Looper.loop(Looper.java:135)  
at android.app.ActivityThread.main(ActivityThread.java:5274)  
at java.lang.reflect.Method.invoke!(Native method)  
at java.lang.reflect.Method.invoke(Method.java:372)  
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:909)  
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:704)  
Pending exception android.runtime.JavaProxyThrowable thrown by 'void mono.java.lang.RunnableImplementor.n_run():-2'
android.runtime.JavaProxyThrowable: System.NullReferenceException: Object reference not set to an instance of an object
 (22346): art/runtime/runtime.cc:284]     
at Consumer.Mobile.Views.RedirectPage.OnBackButtonPressed () [0x00001] in ~\Views\RedirectPage.xaml.cs:66 
at Xamarin.Forms.Page.SendBackButtonPressed () [0x00000] in <filename unknown>:0   
at Xamarin.Forms.NavigationPage.OnBackButtonPressed () [0x00000] in <filename unknown>:0   
at Xamarin.Forms.Page.SendBackButtonPressed () [0x00000] in <filename unknown>:0   
at Xamarin.Forms.Platform.Android.Platform.HandleBackPressed (System.Object sender, System.EventArgs e) [0x00000] in <filename unknown>:   
 at Xamarin.Forms.Platform.Android.FormsApplicationActivity.OnBackPressed () [0x00000] in <filename unknown>:0   
at XLabs.Forms.XFormsApplicationDroid.<>n__FabricatedMethod5 () [0x00000] in <filename unknown>:0   
at XLabs.Forms.XFormsApplicationDroid+<OnBackPressed>d__0.MoveNext () [0x00000] in <filename unknown>:0   
at void mono.java.lang.RunnableImplementor.n_run() (RunnableImplementor.java:-2)  
 at void mono.java.lang.RunnableImplementor.run() (RunnableImplementor.java:29)  
at void android.os.Handler.handleCallback(android.os.Message) (Handler.java:739)

0 个答案:

没有答案