java.lang.RuntimeException: Unable to start activity ComponentInfo{com.lagistos.memalela/com.lagistos.memalela.MainTeacher}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.ImageView.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 Ariel Gal
, 1 year ago
Unable to start activity ComponentInfo{com.lagistos.memalela/com.lagistos.memalela.MainTeacher}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.ImageView.setOnClickListener(android.view.View$OnClickListener)' on a null object reference
via Stack Overflow by Shailender Narang
, 1 year ago
Unable to start activity ComponentInfo{}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.ImageView.setOnClickListener(android.view.View$OnClickListener)' on a null object reference
via Stack Overflow by Dheeraj Vuppuluri
, 1 year ago
Unable to start activity ComponentInfo{database.fab/database.fab.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.ImageView.setOnClickListener(android.view.View$OnClickListener)' on a null object reference
via Stack Overflow by James
, 1 year ago
Unable to start activity ComponentInfo{jbscookbook.example.com.fyp/jbscookbook.example.com.fyp.Favourite_List}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.CheckBox.setOnClickListener(android.view.View$OnClickListener)' on a null object reference
via Stack Overflow by Karlom
, 1 year ago
Unable to start activity ComponentInfo{com.example.dict1/com.example.dict1.DetailActivity}: 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 rishabh jindal
, 1 year ago
Unable to start activity ComponentInfo{g2.screendimmer/g2.screendimmer.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.Button.setOnClickListener(android.view.View$OnClickListener)' on a null object reference
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.lagistos.memalela/com.lagistos.memalela.MainTeacher}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.ImageView.setOnClickListener(android.view.View$OnClickListener)' on a null object reference
at com.lagistos.memalela.MainTeacher.onClickInitialize(MainTeacher.java:164)
at com.lagistos.memalela.MainTeacher.onCreate(MainTeacher.java:58)
at android.app.Activity.performCreate(Activity.java:6178)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1115)

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.

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