java.lang.NullPointerException: Attempt to invoke interface method 'int java.lang.CharSequence.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

Solutions on the web

via Stack Overflow by 이영동
, 1 year ago
Attempt to invoke interface method 'int java.lang.CharSequence.length()' on a null object reference
java.lang.NullPointerException: Attempt to invoke interface method 'int java.lang.CharSequence.length()' on a null object reference
at android.text.TextLine.handleText(TextLine.java:823)
at android.text.TextLine.handleRun(TextLine.java:1030)
at android.text.TextLine.drawRun(TextLine.java:466)
at android.text.TextLine.draw(TextLine.java:264)
at android.text.Layout.drawText(Layout.java:358)
at android.text.Layout.draw(Layout.java:209)
at android.widget.TextView.onDraw(TextView.java:6506)
at android.view.View.draw(View.java:16642)
at android.view.View.draw(View.java:16445)
at android.view.ViewGroup.drawChild(ViewGroup.java:3713)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3506)
at android.view.View.draw(View.java:16440)
at android.view.ViewGroup.drawChild(ViewGroup.java:3713)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3506)
at android.view.View.draw(View.java:16539)
at android.view.View.draw(View.java:16445)
at android.view.ViewGroup.drawChild(ViewGroup.java:3713)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3506)
at android.view.View.draw(View.java:16440)
at android.view.ViewGroup.drawChild(ViewGroup.java:3713)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3506)
at android.view.View.draw(View.java:16440)
at android.view.ViewGroup.drawChild(ViewGroup.java:3713)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3506)
at android.view.View.draw(View.java:16539)
at android.widget.FrameLayout.draw(FrameLayout.java:598)
at android.view.ViewRootImpl.drawSoftware(ViewRootImpl.java:3065)
at android.view.ViewRootImpl.draw(ViewRootImpl.java:2974)
at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2744)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2330)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1305)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7026)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:826)
at android.view.Choreographer.doCallbacks(Choreographer.java:605)
at android.view.Choreographer.doFrame(Choreographer.java:575)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:812)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:145)
at android.app.ActivityThread.main(ActivityThread.java:6914)
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:1404)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1199)

Users with the same issue

Samebug visitor profile picture
Unknown user
Once, 1 year ago

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