java.lang.NullPointerException: println needs a message

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

,

Thrown when an application is trying to use or access an object whose reference equals to null. In this case, the log message cannot be null.

Solutions on the web

via Stack Overflow by techno
, 1 year ago
println needs a message
via Stack Overflow by wakens
, 2 years ago
println needs a message
via Stack Overflow by Unknown author, 2 years ago
java.lang.NullPointerException: println needs a message
at android.util.Log.println_native(Native Method)
at android.util.Log.d(Log.java:139)
at com.example.project.MainActivity.test(MainActivity.java:64)
at com.example.project.MainActivity$1.onClick(MainActivity.java:39)
at android.view.View.performClick(View.java:4756)
at android.view.View$PerformClick.run(View.java:19761)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5253)
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:900)

Users with the same issue

2 times, 1 year ago
48 times, 1 year ago
Once, 1 year ago
6 times, 1 year ago
4 times, 1 year ago

Write tip

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