java.lang.NullPointerException: Attempt to invoke virtual method 'long android.graphics.Paint.getNativeInstance()' on a null object reference

Hot problem!
This exception has a lot of traffic. You can help 18 users by writing a short tip.

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 GitHub by joeykrim
, 1 year ago
Attempt to invoke virtual method 'long android.graphics.Paint.getNativeInstance()' on a null object reference
via GitHub by sahilwebmazix
, 1 year ago
Attempt to invoke virtual method 'long android.graphics.Paint.getNativeInstance()' on a null object reference.
java.lang.NullPointerException: Attempt to invoke virtual method 'long android.graphics.Paint.getNativeInstance()' on a null object reference
at android.graphics.Canvas.drawLine(Canvas.java:1073)
at com.db.chart.view.ChartView.drawVerticalGrid(ChartView.java:800)
at com.db.chart.view.ChartView.onDraw(ChartView.java:730)
at android.view.View.draw(View.java:16184)
at android.view.View.buildDrawingCacheImpl(View.java:15480)
at android.view.View.buildDrawingCache(View.java:15341)
at android.view.View.draw(View.java:15947)
at android.view.ViewGroup.drawChild(ViewGroup.java:3609)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3399)
at android.view.View.updateDisplayListIfDirty(View.java:15175)
at android.view.View.draw(View.java:15954)
at android.view.ViewGroup.drawChild(ViewGroup.java:3609)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3399)
at android.view.View.draw(View.java:16187)
at android.view.View.updateDisplayListIfDirty(View.java:15180)
at android.view.View.draw(View.java:15954)
at android.view.ViewGroup.drawChild(ViewGroup.java:3609)
at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3399)
at android.view.View.draw(View.java:16187)
at android.view.View.updateDisplayListIfDirty(View.java:15180)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3593)
at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3573)
at android.view.View.updateDisplayListIfDirty(View.java:15140)
at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3593)

Users with the same issue

Samebug visitor profile picture
Unknown user
Once, 1 year ago
2 times, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago

Write tip

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