java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.newtable.newtable/com.example.newtable.newtable.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.String.length()' 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

,

Create an empty public constructor in your code.

Solutions on the web

via Stack Overflow by T.Karthikeyan T.Karthikeyan
, 1 year ago
Unable to start activity ComponentInfo{com.example.newtable.newtable/com.example.newtable.newtable.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.String.length()' on a null object reference
via GitHub by jsarabia1247
, 9 months ago
Unable to start activity ComponentInfo{wycliffeassociates.recordingapp/wycliffeassociates.recordingapp.Recording.RecordingScreen}: java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.String.length()' on a null object reference
via Stack Overflow by Unknown author, 1 year ago
Unable to start activity ComponentInfo{com.example.aaa.bbb/com.example.aaa.bbb.Games}: java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.String.length()' on a null object reference
via Stack Overflow by Dawid Trojanowski
, 1 year ago
Unable to start activity ComponentInfo{com.sitepoint.facebook/com.project.you_first.FriendsActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.String.length()' on a null object reference
via Stack Overflow by orange
, 1 year ago
Unable to start activity ComponentInfo{com.example.abe.ateneofiesta/com.example.abe.ateneofiesta.Games}: java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.String.length()' on a null object reference
via Stack Overflow by Rahul
, 2 years ago
Unable to start activity ComponentInfo{com.example.rahul.listviewwithbaseadapter/com.example.rahul.listviewwithbaseadapter.AddlistActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.String.length()' on a null object reference
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.newtable.newtable/com.example.newtable.newtable.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.String.length()' on a null object reference
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2416)

Users with the same issue

66 times, 3 weeks ago
Once, 2 months ago
33 times, 3 months ago
8 times, 3 months ago
468 times, 4 months ago

Write tip

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