Attempt to invoke virtual method 'boolean androidx.viewpager2.widget.ViewPager2.isUserInputEnabled()' on a null object reference at com.youth.banner.Banner.dispatchTouchEvent(Banner.java:199) at

vulvrdjw  于 2022-10-28  发布在  Android
关注(0)|答案(1)|浏览(287)

java.lang.NullPointerException: Attempt to invoke virtual method 'boolean androidx.viewpager2.widget.ViewPager2.isUserInputEnabled()' on a null object reference at com.youth.banner.Banner.dispatchTouchEvent(Banner.java:199) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2938) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2657) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2938) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2657) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2938) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2657) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2938) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2657) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2938) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2657) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2938) at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2657) at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2938) at android.view.ViewGroup.cancelAndClearTouchTargets(ViewGroup.java:2788) at android.view.ViewGroup.dispatchDetachedFromWindow(ViewGroup.java:3673) at android.view.ViewRootImpl.dispatchDetachedFromWindow(ViewRootImpl.java:3474) at android.view.ViewRootImpl.doDie(ViewRootImpl.java:6329) at android.view.ViewRootImpl.die(ViewRootImpl.java:6306) at android.view.WindowManagerGlobal.removeViewLocked(WindowManagerGlobal.java:458) at android.view.WindowManagerGlobal.removeView(WindowManagerGlobal.java:396) at android.view.WindowManagerImpl.removeViewImmediate(WindowManagerImpl.java:124) at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:4423) at android.app.ActivityThread.-wrap5(Unknown Source:0) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1649) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:164) at android.app.ActivityThread.main(ActivityThread.java:6494) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)

相关问题