java.lang.NullPointerException

Attempt to invoke virtual method 'android.content.Intent android.support.v4.app.FragmentActivity.registerReceiver(android.content.BroadcastReceiver, android.content.IntentFilter)' on a null object reference


Solutions on the web21563

Solution icon of stackoverflow
Attempt to invoke virtual method 'android.content.Intent android.support.v4.app.FragmentActivity.registerReceiver(android.content.BroadcastReceiver, android.content.IntentFilter)' on a null object reference

Solution icon of stackoverflow
Attempt to invoke virtual method 'android.content.Intent android.content.Context.registerReceiver(android.content.BroadcastReceiver, android.content.IntentFilter)' on a null object reference

Solution icon of stackoverflow
Attempt to invoke virtual method 'android.content.Intent android.content.Context.registerReceiver(android.content.BroadcastReceiver, android.content.IntentFilter)' on a null object reference

Solution icon of github
Attempt to invoke virtual method 'android.content.Intent android.content.Context.registerReceiver(android.content.BroadcastReceiver, android.content.IntentFilter)' on a null object reference

Solution icon of github
Attempt to invoke virtual method 'void android.support.v4.app.FragmentActivity.sendBroadcast(android.content.Intent)' on a null object reference

Solution icon of github
via GitHub by liliuchen
, 9 months ago
Attempt to invoke virtual method 'void android.support.v4.app.Fragment.startActivityForResult(android.content.Intent, int)' on a null object reference

Solution icon of stackoverflow
Attempt to invoke virtual method 'void android.support.v4.app.Fragment.onActivityResult(int, int, android.content.Intent)' on a null object reference

Solution icon of stackoverflow
Attempt to invoke virtual method 'void android.support.v4.app.Fragment.onActivityResult(int, int, android.content.Intent)' on a null object reference

Solution icon of stackoverflow
Attempt to invoke virtual method 'void android.nfc.NfcAdapter.enableForegroundDispatch(android.app.Activity, android.app.PendingIntent, android.content.IntentFilter[], java.lang.String[][])' on a null object reference

Solution icon of stackoverflow
via Stack Overflow by T.S
, 10 months ago
Attempt to invoke interface method 'android.os.IBinder android.support.v4.media.MediaBrowserServiceCompat$MediaBrowserServiceImpl.onBind(android.content.Intent)' on a null object reference

Stack trace

  • java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.Intent android.support.v4.app.FragmentActivity.registerReceiver(android.content.BroadcastReceiver, android.content.IntentFilter)' on a null object reference at osclassapp.faosclass.com.osclassapp.ThreeFragment$PostGetter$1.customLoadMoreDataFromApi(ThreeFragment.java:483) at osclassapp.faosclass.com.osclassapp.ThreeFragment$PostGetter$1.onLoadMore(ThreeFragment.java:475) at osclassapp.faosclass.com.osclassapp.EndlessScrollListener.onScroll(EndlessScrollListener.java:59) at android.widget.AbsListView.invokeOnItemScrollListener(AbsListView.java:1948) at android.widget.AbsListView.setOnScrollListener(AbsListView.java:1937) at osclassapp.faosclass.com.osclassapp.ThreeFragment$PostGetter.onPostExecute(ThreeFragment.java:472) at android.os.AsyncTask.finish(AsyncTask.java:636) at android.os.AsyncTask.access$500(AsyncTask.java:177) at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:653) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:145)

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

You are the first who have seen this exception. Write a tip to help other users and build your expert profile.