Top "Nullpointerexception" questions

The Java exception thrown when an application attempts to use null in a case where an object is required.

NullPointerException on getActivity().runOnUiThread(new Runnable(){

I know there are many different causes for NPE but mine is slightly weird (At least to me). So I …

java android eclipse class nullpointerexception
NullPointerException : FragmentManager.beginTransaction()

I'm getting this error while trying to launch a Fragment from a first Fragment : java.lang.NullPointerException: Attempt to invoke …

android nullpointerexception fragment fragmenttransaction
ButterKnife 8.0.1 not working

I am using butterknife 8.0.1, but a nullpointerexception is appearing. This line is on my build.grade file: compile 'com.jakewharton:…

android nullpointerexception butterknife
JsonMappingException (was java.lang.NullPointerException)

I've been searching for this for a while but haven't found any answers, so either I'm missing something so obvious …

java json nullpointerexception jackson idml
JComboBox: want first entry to be blank entry

I have a jcombobox which values come from a list. I want to first value to be blank from dropdown …

java swing combobox nullpointerexception jcombobox
findViewById() returns null for Views in a Dialog

The problem is, no matter where or how I call for this layout's components, they always return null. setView(inflater.…

android nullpointerexception android-resources android-dialog findviewbyid
NullPointerException on button's OnClickListener

I'm writing an Android game app for an Artificial Intelligence semester project. I'm getting a NullPointerException on Line 38 of the …

android nullpointerexception android-button
Why can I throw null in Java?

When running this: public class WhatTheShoot { public static void main(String args[]){ try { throw null; } catch (Exception e){ System.out.…

java exception-handling nullpointerexception
NullPointerException stack trace not available without debug agent

I have recently found a bug that causes a NullPointerException. The exception is caught and logged using a standard slf4…

java logging stack-trace nullpointerexception
Set a menu item as checked from code

I have an Android application with the following menu item in one of the Activities (which concerns handling a list …

android nullpointerexception menuitem runtimeexception