java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.dennis.afbstellplatzbuchung/com.example.dennis.afbstellplatzbuchung.Settings}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.Button.setOnClickListener(android.view.View$OnClickListener)' on a null object reference

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via Stack Overflow by Dennis Bölling
, 1 year ago
Unable to start activity ComponentInfo{com.example.dennis.afbstellplatzbuchung/com.example.dennis.afbstellplatzbuchung.Settings}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.Button.setOnClickListener(android.view.View$OnClickListener)' on a null object reference
via Stack Overflow by Amit Kishor
, 1 year ago
Unable to start activity ComponentInfo{com.example.atry.atry/com.example.atry.atry.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.Button.setOnClickListener(android.view.View$OnClickListener)' on a null object reference
via Stack Overflow by Maruf Heavyman
, 1 year ago
Unable to start activity ComponentInfo{com.deneme.deneme/com.deneme.deneme.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.Button.setOnClickListener(android.view.View$OnClickListener)' on a null object reference
via Stack Overflow by adem mehdioui
, 1 month ago
Unable to start activity ComponentInfo{info.adem.tplogin/info.adem.tplogin.FriendActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.Button.setOnClickListener(android.view.View$OnClickListener)' on a null object reference
via Stack Overflow by Georq
, 11 months ago
Unable to start activity ComponentInfo{silverbeach.meintieralter/silverbeach.meintieralter.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.Button.setOnClickListener(android.view.View$OnClickListener)' on a null object reference
via Stack Overflow by Shibin Kalliatt
, 4 months ago
Unable to start activity ComponentInfo{net.donateclub.codend.donateclub/net.donateclub.codend.donateclub.ResetPasswordOTP}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.Button.setOnClickListener(android.view.View$OnClickListener)' on a null object reference
java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.Button.setOnClickListener(android.view.View$OnClickListener)' on a null object reference
at com.example.dennis.afbstellplatzbuchung.Settings.backToMain(Settings.java:134)
at com.example.dennis.afbstellplatzbuchung.Settings.onCreate(Settings.java:41)
at android.app.Activity.performCreate(Activity.java:6876)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1135)

Users with the same issue

You are the first who have seen this exception.

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.