NullPointerException
See original GitHub issuei just integrated the library and i got this Error on launching the app
FATAL EXCEPTION: main Process: com.wadeeny.ondemand, PID: 20144 java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.view.View.isNestedScrollingEnabled()' on a null object reference at android.support.v4.view.ViewCompat$ViewCompatApi21Impl.isNestedScrollingEnabled(ViewCompat.java:1320) at android.support.v4.view.ViewCompat.isNestedScrollingEnabled(ViewCompat.java:3308) at biz.laenger.android.vpbs.ViewPagerBottomSheetBehavior.findScrollingChild(ViewPagerBottomSheetBehavior.java:609) at biz.laenger.android.vpbs.ViewPagerBottomSheetBehavior.findScrollingChild(ViewPagerBottomSheetBehavior.java:615) at biz.laenger.android.vpbs.ViewPagerBottomSheetBehavior.findScrollingChild(ViewPagerBottomSheetBehavior.java:622) at biz.laenger.android.vpbs.ViewPagerBottomSheetBehavior.onLayoutChild(ViewPagerBottomSheetBehavior.java:252) at android.support.design.widget.CoordinatorLayout.onLayout(CoordinatorLayout.java:894) at android.view.View.layout(View.java:19590) at android.view.ViewGroup.layout(ViewGroup.java:6053) at android.support.v4.widget.DrawerLayout.onLayout(DrawerLayout.java:1171) at android.view.View.layout(View.java:19590) at android.view.ViewGroup.layout(ViewGroup.java:6053) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323) at android.widget.FrameLayout.onLayout(FrameLayout.java:261) at android.view.View.layout(View.java:19590) at android.view.ViewGroup.layout(ViewGroup.java:6053) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323) at android.widget.FrameLayout.onLayout(FrameLayout.java:261) at android.view.View.layout(View.java:19590) at android.view.ViewGroup.layout(ViewGroup.java:6053) at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1791) at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1635) at android.widget.LinearLayout.onLayout(LinearLayout.java:1544) at android.view.View.layout(View.java:19590) at android.view.ViewGroup.layout(ViewGroup.java:6053) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323) at android.widget.FrameLayout.onLayout(FrameLayout.java:261) at android.view.View.layout(View.java:19590) at android.view.ViewGroup.layout(ViewGroup.java:6053) at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1791) at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1635) at android.widget.LinearLayout.onLayout(LinearLayout.java:1544) at android.view.View.layout(View.java:19590) at android.view.ViewGroup.layout(ViewGroup.java:6053) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323) at android.widget.FrameLayout.onLayout(FrameLayout.java:261) at com.android.internal.policy.DecorView.onLayout(DecorView.java:758) at android.view.View.layout(View.java:19590) at android.view.ViewGroup.layout(ViewGroup.java:6053) at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2488) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2204) at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1390) at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6754) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:966) at android.view.Choreographer.doCallbacks(Choreographer.java:778) at android.view.Choreographer.doFrame(Choreographer.java:713) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:952) at android.os.Handler.handleCallback(Handler.java:789) at android.os.Handler.dispatchMessage(Handler.java:98) at android.os.Looper.loop(Looper.java:172) at android.app.ActivityThread.main(ActivityThread.java:6637) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
Issue Analytics
- State:
- Created 5 years ago
- Comments:12 (3 by maintainers)
Top GitHub Comments
I was also having this problem. I solved it by adding
android:nestedScrollingEnabled="true"
to myViewPager
.For a better understanding, I show you how I use it. ` override fun onViewCreated(view: View, savedInstanceState: Bundle?) {super.onViewCreated(view, savedInstanceState)