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

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 unity3d.com by Unknown author, 1 year ago
Attempt to invoke virtual method 'int java.lang.String.length()' on a null object reference
via unity3d.com by Unknown author, 1 year ago
Attempt to invoke virtual method 'int java.lang.String.length()' on a null object reference
via stansassets.com by Unknown author, 10 months ago
Attempt to invoke virtual method 'int java.lang.String.length()' on a null object reference
via Stack Overflow by swags mint
, 9 months ago
Attempt to invoke virtual method 'int java.lang.String.length()' on a null object reference
via GitHub by blueleader07
, 2 years ago
Attempt to invoke virtual method 'int java.lang.String.length()' on a null object reference
via Stack Overflow by S SATHISHBABU
, 1 year ago
Attempt to invoke virtual method 'int java.lang.String.length()' on a null object reference
java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.String.length()' on a null object reference
at org.json.JSONTokener.nextCleanInternal(JSONTokener.java:116)
at org.json.JSONTokener.nextValue(JSONTokener.java:94)
at org.json.JSONObject.(JSONObject.java:156)
at org.json.JSONObject.(JSONObject.java:173)
at com.androidnative.gcm.GcmIntentService.sendNotification(GcmIntentService.java:171)
at com.androidnative.gcm.GcmIntentService.onHandleIntent(GcmIntentService.java:93)
at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.os.HandlerThread.run(HandlerThread.java:61)

Users with the same issue

3 times, 2 months ago
25 times, 4 months ago
Samebug visitor profile picture
Unknown user
Once, 10 months ago
Once, 10 months ago
38 times, 11 months ago

Write tip

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