java.lang.NullPointerException

Attempt to invoke virtual method 'void android.support.design.widget.NavigationView.setNavigationItemSelectedListener(android.support.design.widget.NavigationView$OnNavigationItemSelectedListener)' on a null object reference


Solutions on the web21642

Solution icon of stackoverflow
Attempt to invoke virtual method 'void android.support.design.widget.NavigationView.setNavigationItemSelectedListener(android.support.design.widget.NavigationView$OnNavigationItemSelectedListener)' on a null object reference

Solution icon of github
via GitHub by ilandblack
, 9 months ago
Attempt to invoke virtual method 'void android.graphics.Bitmap.recycle()' on a null object reference

Solution icon of github
via GitHub by negue
, 10 months ago
Attempt to invoke virtual method 'void android.widget.Button.setEnabled(boolean)' on a null object reference

Solution icon of github
via GitHub by treelzebub
, 2 months ago
Attempt to invoke virtual method 'void com.levelmoney.conduit.logic.ConduitRetainFragment.load(android.os.Bundle)' on a null object reference

Solution icon of github
Attempt to invoke virtual method 'void android.bluetooth.BluetoothGattCallback.onConnectionStateChange(android.bluetooth.BluetoothGatt, int, int)' on a null object reference

Solution icon of github
via GitHub by Harry-Chen
, 1 year ago
Attempt to invoke virtual method 'void android.view.ViewGroup.transformMatrixToGlobal(android.graphics.Matrix)' on a null object reference

Solution icon of github
via GitHub by eldivino87
, 1 year ago
Attempt to invoke virtual method 'void com.github.mikephil.charting.buffer.LineBuffer.setPhases(float, float)' on a null object reference

Solution icon of github
via GitHub by Cr-cm
, 1 year ago
Attempt to invoke virtual method 'void android.preference.Preference.onPrepareForRemoval()' on a null object reference

Solution icon of github
via GitHub by bhb27
, 4 months ago
Attempt to invoke virtual method 'void android.widget.TextView.setText(java.lang.CharSequence)' on a null object reference

Solution icon of github
Attempt to invoke virtual method 'void android.widget.RelativeLayout.addView(android.view.View, android.view.ViewGroup$LayoutParams)' on a null object reference

Stack trace

  • java.lang.NullPointerException: Attempt to invoke virtual method 'void android.support.design.widget.NavigationView.setNavigationItemSelectedListener(android.support.design.widget.NavigationView$OnNavigationItemSelectedListener)' on a null object reference at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2416) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)

Write tip

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

Users with the same issue

Once, 7 months ago
Samebug visitor profile picture
Unknown user
Once, 8 months ago
5 times, 9 months ago
9 times, 10 months ago
1249 times, 1 year ago
4 more bugmates