0

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

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)
4

0 回答 0