This question is locked. New answers and comments are not allowed.
Hey all,
When I navigate to a new view my app crashes on Android with the following stack trace:
E/TNS.Native( 5898): Error: java.lang.NullPointerException: Attempt to invoke virtual method 'int android.view.View.getImportantForAccessibility()' on a null object reference
E/TNS.Native( 5898): android.widget.AbsListView.obtainView(AbsListView.java:2360)
E/TNS.Native( 5898): android.widget.ListView.makeAndAddView(ListView.java:1864)
E/TNS.Native( 5898): android.widget.ListView.fillDown(ListView.java:698)
E/TNS.Native( 5898): android.widget.ListView.fillFromTop(ListView.java:759)
E/TNS.Native( 5898): android.widget.ListView.layoutChildren(ListView.java:1659)
E/TNS.Native( 5898): android.widget.AbsListView.onLayout(AbsListView.java:2148)
E/TNS.Native( 5898): android.view.View.layout(View.java:15596)
E/TNS.Native( 5898): android.view.ViewGroup.layout(ViewGroup.java:4966)
E/TNS.Native( 5898): com.tns.Platform.callJSMethodNative(Native Method)
E/TNS.Native( 5898): com.tns.Platform.dispatchCallJSMethodNative(Platform.java:799)
E/TNS.Native( 5898): com.tns.Platform.callJSMethod(Platform.java:644)
E/TNS.Native( 5898): com.tns.Platform.callJSMethod(Platform.java:628)
E/TNS.Native( 5898): com.tns.Platform.callJSMethod(Platform.java:618)
E/TNS.Native( 5898): com.tns.android.view.ViewGroup.onLayout(ViewGroup.java:4515)
E/TNS.Native( 5898): android.view.View.layout(View.java:15596)
E/TNS.Native( 5898): android.view.ViewGroup.layout(ViewGroup.java:4966)
E/TNS.Native( 5898): android.widget.FrameLayout.layoutChildren(FrameLayout.java:573)
E/TNS.Native( 5898): android.widget.FrameLayout.onLayout(FrameLayout.java:508)
E/TNS.Native( 5898): android.view.View.layout(View.java:15596)
E/TNS.Native( 5898): android.view.ViewGroup.layout(ViewGroup.java:4966)
E/TNS.Native( 5898): com.android.internal.widget.ActionBarOverlayLayout.onLayout(ActionBarOverlayLayout.java:494)
E/TNS.Native( 5898): android.view.View.layout(View.java:15596)
E/TNS.Native( 5898): android.view.ViewGroup.layout(ViewGroup.java:4966)
E/TNS.Native( 5898): android.widget.FrameLayout.layoutChildren(FrameLayout.java:573)
E/TNS.Native( 5898): android.widget.FrameLayout.onLayout(FrameLayout.java:508)
E/TNS.Native( 5898): android.view.View.layout(View.java:15596)
E/TNS.Native( 5898): android.view.ViewGroup.layout(ViewGroup.java:4966)
E/TNS.Native( 5898): android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2072)
E/TNS.Native( 5898): android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1829)
E/TNS.Native( 5898): android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1054)
E/TNS.Native( 5898): android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5779)
E/TNS.Native( 5898): android.view.Choreographer$CallbackRecord.run(Choreographer.java:767)
E/TNS.Native( 5898): android.view.Choreographer.doCallbacks(Choreographer.java:580)
E/TNS.Native( 5898): android.view.Choreographer.doFrame(Choreographer.java:550)
E/TNS.Native( 5898): android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:753)
E/TNS.Native( 5898): android.os.Handler.handleCallback(Handler.java:739)
E/TNS.Native( 5898): android.os.Handler.dispatchMessage(Handler.java:95)
E/TNS.Native( 5898): android.os.Looper.loop(Looper.java:135)
E/TNS.Native( 5898): android.app.ActivityThread.main(ActivityThread.java:5221)
E/TNS.Native( 5898): java.lang.reflect.Method.invoke(Native Method)
E/TNS.Native( 5898): java.lang.reflect.Method.invoke(Method.java:372)
E/TNS.Native( 5898): com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
E/TNS.Native( 5898): com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
E/TNS.Native( 5898): File: "ui/core/view, line: 133, column: 17
E/TNS.Native( 5898): StackTrace:
E/TNS.Native( 5898): Frame: function:'View._setBounds', file:'ui/core/view', line: 131, column: 18
E/TNS.Native( 5898): Frame: function:'LayoutInfo.arrange', file:'ui/core/layout', line: 115, column: 23
E/TNS.Native( 5898): Frame: function:'View.arrange', file:'ui/core/view-common', line: 252, column: 26
E/TNS.Native( 5898): Frame: function:'GridPanel._arrangeOverride', file:'ui/panels/grid-panel', line: 829, column: 30
E/TNS.Native( 5898): Frame: function:'LayoutInfo.arrangeCore', file:'ui/core/layout', line: 152, column: 19
E/TNS.Native( 5898): Frame: function:'LayoutInfo.arrange', file:'ui/core/layout', line: 108, column: 14
E/TNS.Native( 5898): Frame: function:'View.arrange', file:'ui/core/view-common', line: 252, column: 26
E/TNS.Native( 5898): Frame: function:'ContentView._arrangeOverride', file:'ui/content-view/content-view-common', line: 62, column: 26
E/TNS.Native( 5898): Frame: function:'LayoutInfo.arrangeCore', file:'ui/core/layout', line: 152, column: 19
E/TNS.Native( 5898): Frame: function:'LayoutInfo.arrange', file:'ui/core/layout', line: 108, column: 14
E/TNS.Native( 5898): Frame: function:'View.arrange', file:'ui/core/view-common', line: 252, column: 26
E/TNS.Native( 5898): Frame: function:'Frame._arrangeOverride', file:'ui/frame', line: 251, column: 30
E/TNS.Native( 5898): Frame: function:'LayoutInfo.arrangeCore', file:'ui/core/layout', line: 152, column: 19
E/TNS.Native( 5898): Frame: function:'LayoutInfo.arrange', file:'ui/core/layout', line: 108, column: 14
E/TNS.Native( 5898): Frame: function:'View.arrange', file:'ui/core/view-common', line: 252, column: 26
E/TNS.Native( 5898): Frame: function:'onLayoutNative', file:'utils/utils', line: 126, column: 24
I'm not sure what's up or how to debug this further. The app works fine on iOS. To recreate this you can clone this app (https://github.com/tjvantoll/groceries), run it on Android, and click the Sign in button. It crashes every time.
Any help would be appreciated.
Thanks,
TJ
When I navigate to a new view my app crashes on Android with the following stack trace:
E/TNS.Native( 5898): Error: java.lang.NullPointerException: Attempt to invoke virtual method 'int android.view.View.getImportantForAccessibility()' on a null object reference
E/TNS.Native( 5898): android.widget.AbsListView.obtainView(AbsListView.java:2360)
E/TNS.Native( 5898): android.widget.ListView.makeAndAddView(ListView.java:1864)
E/TNS.Native( 5898): android.widget.ListView.fillDown(ListView.java:698)
E/TNS.Native( 5898): android.widget.ListView.fillFromTop(ListView.java:759)
E/TNS.Native( 5898): android.widget.ListView.layoutChildren(ListView.java:1659)
E/TNS.Native( 5898): android.widget.AbsListView.onLayout(AbsListView.java:2148)
E/TNS.Native( 5898): android.view.View.layout(View.java:15596)
E/TNS.Native( 5898): android.view.ViewGroup.layout(ViewGroup.java:4966)
E/TNS.Native( 5898): com.tns.Platform.callJSMethodNative(Native Method)
E/TNS.Native( 5898): com.tns.Platform.dispatchCallJSMethodNative(Platform.java:799)
E/TNS.Native( 5898): com.tns.Platform.callJSMethod(Platform.java:644)
E/TNS.Native( 5898): com.tns.Platform.callJSMethod(Platform.java:628)
E/TNS.Native( 5898): com.tns.Platform.callJSMethod(Platform.java:618)
E/TNS.Native( 5898): com.tns.android.view.ViewGroup.onLayout(ViewGroup.java:4515)
E/TNS.Native( 5898): android.view.View.layout(View.java:15596)
E/TNS.Native( 5898): android.view.ViewGroup.layout(ViewGroup.java:4966)
E/TNS.Native( 5898): android.widget.FrameLayout.layoutChildren(FrameLayout.java:573)
E/TNS.Native( 5898): android.widget.FrameLayout.onLayout(FrameLayout.java:508)
E/TNS.Native( 5898): android.view.View.layout(View.java:15596)
E/TNS.Native( 5898): android.view.ViewGroup.layout(ViewGroup.java:4966)
E/TNS.Native( 5898): com.android.internal.widget.ActionBarOverlayLayout.onLayout(ActionBarOverlayLayout.java:494)
E/TNS.Native( 5898): android.view.View.layout(View.java:15596)
E/TNS.Native( 5898): android.view.ViewGroup.layout(ViewGroup.java:4966)
E/TNS.Native( 5898): android.widget.FrameLayout.layoutChildren(FrameLayout.java:573)
E/TNS.Native( 5898): android.widget.FrameLayout.onLayout(FrameLayout.java:508)
E/TNS.Native( 5898): android.view.View.layout(View.java:15596)
E/TNS.Native( 5898): android.view.ViewGroup.layout(ViewGroup.java:4966)
E/TNS.Native( 5898): android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2072)
E/TNS.Native( 5898): android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1829)
E/TNS.Native( 5898): android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1054)
E/TNS.Native( 5898): android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5779)
E/TNS.Native( 5898): android.view.Choreographer$CallbackRecord.run(Choreographer.java:767)
E/TNS.Native( 5898): android.view.Choreographer.doCallbacks(Choreographer.java:580)
E/TNS.Native( 5898): android.view.Choreographer.doFrame(Choreographer.java:550)
E/TNS.Native( 5898): android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:753)
E/TNS.Native( 5898): android.os.Handler.handleCallback(Handler.java:739)
E/TNS.Native( 5898): android.os.Handler.dispatchMessage(Handler.java:95)
E/TNS.Native( 5898): android.os.Looper.loop(Looper.java:135)
E/TNS.Native( 5898): android.app.ActivityThread.main(ActivityThread.java:5221)
E/TNS.Native( 5898): java.lang.reflect.Method.invoke(Native Method)
E/TNS.Native( 5898): java.lang.reflect.Method.invoke(Method.java:372)
E/TNS.Native( 5898): com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
E/TNS.Native( 5898): com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
E/TNS.Native( 5898): File: "ui/core/view, line: 133, column: 17
E/TNS.Native( 5898): StackTrace:
E/TNS.Native( 5898): Frame: function:'View._setBounds', file:'ui/core/view', line: 131, column: 18
E/TNS.Native( 5898): Frame: function:'LayoutInfo.arrange', file:'ui/core/layout', line: 115, column: 23
E/TNS.Native( 5898): Frame: function:'View.arrange', file:'ui/core/view-common', line: 252, column: 26
E/TNS.Native( 5898): Frame: function:'GridPanel._arrangeOverride', file:'ui/panels/grid-panel', line: 829, column: 30
E/TNS.Native( 5898): Frame: function:'LayoutInfo.arrangeCore', file:'ui/core/layout', line: 152, column: 19
E/TNS.Native( 5898): Frame: function:'LayoutInfo.arrange', file:'ui/core/layout', line: 108, column: 14
E/TNS.Native( 5898): Frame: function:'View.arrange', file:'ui/core/view-common', line: 252, column: 26
E/TNS.Native( 5898): Frame: function:'ContentView._arrangeOverride', file:'ui/content-view/content-view-common', line: 62, column: 26
E/TNS.Native( 5898): Frame: function:'LayoutInfo.arrangeCore', file:'ui/core/layout', line: 152, column: 19
E/TNS.Native( 5898): Frame: function:'LayoutInfo.arrange', file:'ui/core/layout', line: 108, column: 14
E/TNS.Native( 5898): Frame: function:'View.arrange', file:'ui/core/view-common', line: 252, column: 26
E/TNS.Native( 5898): Frame: function:'Frame._arrangeOverride', file:'ui/frame', line: 251, column: 30
E/TNS.Native( 5898): Frame: function:'LayoutInfo.arrangeCore', file:'ui/core/layout', line: 152, column: 19
E/TNS.Native( 5898): Frame: function:'LayoutInfo.arrange', file:'ui/core/layout', line: 108, column: 14
E/TNS.Native( 5898): Frame: function:'View.arrange', file:'ui/core/view-common', line: 252, column: 26
E/TNS.Native( 5898): Frame: function:'onLayoutNative', file:'utils/utils', line: 126, column: 24
I'm not sure what's up or how to debug this further. The app works fine on iOS. To recreate this you can clone this app (https://github.com/tjvantoll/groceries), run it on Android, and click the Sign in button. It crashes every time.
Any help would be appreciated.
Thanks,
TJ