java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.anubh.contactsearch/com.example.anubh.contactsearch.MainActivity}: java.lang.NullPointerException: Attempt to invoke interface method 'boolean java.util.List.add(java.lang.Object)' 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

Samebug tips

Do you know how to solve this issue? Write a tip to help other users and build your expert profile.

Solutions on the web

via Stack Overflow by Anubhav
, 1 year ago
Unable to start activity ComponentInfo{com.example.anubh.contactsearch/com.example.anubh.contactsearch.MainActivity}: java.lang.NullPointerException: Attempt to invoke interface method 'boolean java.util.List.add(java.lang.Object)' on a null object reference
via Stack Overflow by Plex752
, 1 year ago
Unable to start activity ComponentInfo{dev.com.test/dev.com.test.ServiceActivity}: java.lang.NullPointerException: Attempt to invoke interface method 'boolean java.util.List.add(java.lang.Object)' on a null object reference
via GitHub by Dahnark
, 7 months ago
Unable to start activity ComponentInfo{com.company.MyApp/com.company.MyApp.MainActivity}: java.lang.NullPointerException: Attempt to invoke interface method 'boolean java.util.List.add(java.lang.Object)' on a null object reference
via Stack Overflow by Murat UÇAN
, 1 year ago
Unable to start activity ComponentInfo{com.muratucan.murat5hidden/com.muratucan.murat5hidden.MainActivity}: java.lang.NullPointerException: Attempt to invoke interface method 'boolean java.util.Collection.add(java.lang.Object)' on a null object reference
via sinaapp.com by Unknown author, 2 years ago
Unable to start activity ComponentInfo{com.muratucan.murat5hidden/com.muratucan.murat5hidden.MainActivity}: java.lang.NullPointerException: Attempt to invoke interface method 'boolean java.util.Collection.add(java.lang.Object)' on a null object reference
via GitHub by NerosTie
, 1 year ago
Unable to start activity ComponentInfo{com.stevenschoen.emojiswitcher/com.stevenschoen.emojiswitcher.SwitcherActivity}: java.lang.NullPointerException: Attempt to invoke interface method 'boolean java.util.List.isEmpty()' on a null object reference
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.anubh.contactsearch/com.example.anubh.contactsearch.MainActivity}: java.lang.NullPointerException: Attempt to invoke interface method 'boolean java.util.List.add(java.lang.Object)' on a null object reference
at com.example.anubh.contactsearch.myAdapter.(myAdapter.java:71)
at com.example.anubh.contactsearch.MainActivity.onCreate(MainActivity.java:30)
at android.app.Activity.performCreate(Activity.java:5966)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2408)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2517)
at android.app.ActivityThread.access$800(ActivityThread.java:162)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1412)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:189)
at android.app.ActivityThread.main(ActivityThread.java:5530)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:950)

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.

Write tip

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