java.lang.RuntimeException: Unable to start activity ComponentInfo{ir.homa/ir.homa.HotelDetail}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.ListView.setAdapter(android.widget.ListAdapter)' 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 Mohammadreza
, 1 year ago
Unable to start activity ComponentInfo{ir.homa/ir.homa.HotelDetail}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.ListView.setAdapter(android.widget.ListAdapter)' on a null object reference
via Stack Overflow by Unknown author, 2 years ago
Unable to start activity ComponentInfo{com.doplexer.lineplus/com.doplexer.lineplus.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.ListView.setAdapter(android.widget.ListAdapter)' on a null object reference
via Stack Overflow by Rory
, 2 years ago
Unable to start activity ComponentInfo{app.rory.menu/app.rory.pocket_chef.MyActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.ListView.setAdapter(android.widget.ListAdapter)' on a null object reference
via blogspot.com by Unknown author, 1 year ago
Unable to start activity ComponentInfo{com.maya.esoj.listaviewpager/com.maya.esoj.listaviewpager.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.ListView.setAdapter(android.widget.ListAdapter)' on a null object reference
via Stack Overflow by Unknown author, 2 years ago
Unable to start activity ComponentInfo{com.example.app/com.example.app.ActivityMain}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.ListView.setAdapter(android.widget.ListAdapter)' on a null object reference
via Stack Overflow by Mark T
, 2 years ago
Unable to start activity ComponentInfo{info.androidhive.materialdesign/info.androidhive.materialdesign.activity.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.ListView.setAdapter(android.widget.ListAdapter)' on a null object reference
java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.ListView.setAdapter(android.widget.ListAdapter)' on a null object reference
at ir.homa.HotelDetail.onCreate(HotelDetail.java:43)
at android.app.Activity.performCreate(Activity.java:5937)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1105)

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.