mikepenz/MaterialDrawer

NullPointerException IDrawerItem

4bottiglie opened this issue · 0 comments

Hi, for some reason i'am getting this error after the migration and i don't have any idea how to reproduce it beacuse happens only at a small ammount of users:

  • Android version 11 Galaxy S20+
  • Android version 10 Mi A3
  • etc.
    Do you have any idea how to solve it? maybe it's enought just a null check?

Details

  • [Yes] Used library version v8.4.1
  • [Yes] Used support library version 'androidx.legacy:legacy-support-v4:1.0.0'
  • [Yes] Used gradle build tools version 4.2.2
  • [Yes] Used tooling / Android Studio version 4.2.1
  • [Yes] Other used libraries, potential conflicting libraries none

Checklist


Fatal Exception: java.lang.NullPointerException: null cannot be cast to non-null type com.mikepenz.materialdrawer.model.interfaces.IDrawerItem<*>
       at java.util.Objects.requireNonNull(Objects.java:245)
       at com.mikepenz.materialdrawer.util.DrawerUtils$rebuildStickyFooterView$$inlined$let$lambda$1.onClick(DrawerUtils.java:151)
       at android.view.View.performClick(View.java:8160)
       at android.view.View.performClickInternal(View.java:8137)
       at android.view.View.access$3700(View.java:888)
       at android.view.View$PerformClick.run(View.java:30236)
       at android.os.Handler.handleCallback(Handler.java:938)
       at android.os.Handler.dispatchMessage(Handler.java:99)
       at android.os.Looper.loop(Looper.java:246)
       at android.app.ActivityThread.main(ActivityThread.java:8512)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:602)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1130)