Java.Lang.RuntimeException:在S7 mobile

时间:2018-05-08 10:28:52

标签: c# xamarin xamarin.forms xamarin.android android-7.0-nougat

我在xamarin.android应用程序中长时间按下编辑器控件时遇到异常。在使用OS Verison 7.0的Samsung S7上发生此问题

  

未处理的异常:Java.Lang.RuntimeException:尝试调用   虚方法'布尔值   android.widget.Editor $ SelectionModifierCursorController.isDragAcceleratorActive()”   在空对象引用上发生

以下是异常的堆栈跟踪

java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.widget.Editor$SelectionModifierCursorController.isDragAcceleratorActive()' on a null object reference
    at android.widget.Editor.updateFloatingToolbarVisibility(Editor.java:1520)
    at android.widget.Editor.onTouchEvent(Editor.java:1475)
    at android.widget.TextView.onTouchEvent(TextView.java:10024)
    at android.view.View.dispatchTouchEvent(View.java:10725)
    at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2865)
    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2550)
    at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2865)
    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2550)
    at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2865)
    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2550)
    at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2865)
    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2550)
    at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2865)
    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2550)
    at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2865)
    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2550)
    at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2865)
    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2550)
    at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2865)
    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2550)
    at android.widget.ScrollView.dispatchTouchEvent(ScrollView.java:738)
    at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2865)
    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2550)
    at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2865)
    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2550)
    at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2865)
    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2550)
    at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2865)
    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2550)
    at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2865)
    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2550)
    at md5b60ffeb829f638581ab2bb9b1a7f4f3f.PlatformRenderer.n_dispatchTouchEvent(Native Method)
    at md5b60ffeb829f638581ab2bb9b1a7f4f3f.PlatformRenderer.dispatchTouchEvent(PlatformRenderer.java:55)
    at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2865)
    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2550)
    at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2865)
    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2550)
    at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2865)
    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2550)
    at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2865)
    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2550)
    at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2865)
    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2550)
    at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2865)
    at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2550)
    at com.android.internal.policy.DecorView.superDispatchTouchEvent(DecorView.java:505)
    at com.android.internal.policy.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1863)
    at android.app.Activity.dispatchTouchEvent(Activity.java:3226)
    at android.support.v7.view.WindowCallbackWrapper.dispatchTouchEvent(WindowCallbackWrapper.java:60)
    at android.support.v7.view.WindowCallbackWrapper.dispatchTouchEvent(WindowCallbackWrapper.java:60)
    at com.android.internal.policy.DecorView.dispatchTouchEvent(DecorView.java:467)
    at android.view.View.dispatchPointerEvent(View.java:10954)
    at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:5051)
    at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:4908)
    at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4439)
    at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4492)
    at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4458)
    at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:4591)
    at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4466)
    at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:4648)
    at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4439)
    at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:4492)
    at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:4458)
    at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:4466)
    at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:4439)
    at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:6936)
    at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:6875)
    at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:6836)
    at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:7046)
    at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:185)
    at android.view.InputEventReceiver.nativeConsumeBatchedInputEvents(Native Method)
    at android.view.InputEventReceiver.consumeBatchedInputEvents(InputEventReceiver.java:176)
    at android.view.ViewRootImpl.doConsumeBatchedInput(ViewRootImpl.java:7010)
    at android.view.ViewRootImpl$ConsumeBatchedInputRunnable.run(ViewRootImpl.java:7073)
    at android.view.Choreographer$CallbackRecord.run(Choreographer.java:927)
    at android.view.Choreographer.doCallbacks(Choreographer.java:702)
    at android.view.Choreographer.doFrame(Choreographer.java:632)
    at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:913)
    at android.os.Handler.handleCallback(Handler.java:751)
    at android.os.Handler.dispatchMessage(Handler.java:95)
    at android.os.Looper.loop(Looper.java:154)
    at android.app.ActivityThread.main(ActivityThread.java:6688)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1468)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1358)

我们正在动态创建Editor控件。

此问题未在任何其他设备上发生。

对此有任何帮助表示赞赏。 !

0 个答案:

没有答案