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 bielas
, 1 year ago
Unable to start activity ComponentInfo{com.example.micha.locationtest/com.example.micha.locationtest.activities.MapsActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'double android.location.Location.getLatitude()' on a null object reference
via GitHub by MisterY
, 2 years ago
Unable to start activity ComponentInfo{com.money.manager.ex/com.money.manager.ex.recurring.transactions.EditRecurringTransactionActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'double java.lang.Double.doubleValue()' on a null object reference
via Stack Overflow by 张林周
, 1 year ago
Unable to start activity ComponentInfo{。。.HomeActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'int java.util.ArrayList.indexOf(java.lang.Object)' on a null object reference
via GitHub by Lineflyer
, 1 year ago
Unable to start activity ComponentInfo{cgeo.geocaching/cgeo.geocaching.settings.SettingsActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'java.io.File java.io.File.getCanonicalFile()' on a null object reference
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.micha.locationtest/com.example.micha.locationtest.activities.MapsActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'double android.location.Location.getLatitude()' on a null object reference at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3150) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3260) at android.app.ActivityThread.access$1000(ActivityThread.java:218) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1734) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:145) at android.app.ActivityThread.main(ActivityThread.java:6934) 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)Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'double android.location.Location.getLatitude()' on a null object reference at com.example.micha.locationtest.activities.MapsActivity.onCreate(MapsActivity.java:76)