java.lang.RuntimeException: Unable to start activity ComponentInfo{neerajshah.locationnearby/neerajshah.locationnearby.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void com.google.android.gms.maps.GoogleMap.setMyLocationEnabled(boolean)' 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 user6313669
, 1 year ago
Unable to start activity ComponentInfo{neerajshah.locationnearby/neerajshah.locationnearby.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void com.google.android.gms.maps.GoogleMap.setMyLocationEnabled(boolean)' on a null object reference
via GitHub by RyanElliott94
, 6 months ago
Unable to start activity ComponentInfo{com.skintmedia.voice/com.braunster.chatsdk.activities.ChatSDKLoginActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean com.braunster.chatsdk.network.AbstractNetworkAdapter.facebookEnabled()' on a null object reference
via Stack Overflow by neha
, 4 months ago
Unable to start activity ComponentInfo{com.example.android.bleiqn/com.example.android.bleiqn.PeripheralActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.app.ActionBar.setDisplayHomeAsUpEnabled(boolean)' on a null object reference
via GitHub by BishopGIS
, 1 year ago
Unable to start activity ComponentInfo{com.nextgis.mobile/com.nextgis.mobile.activity.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void com.nextgis.maplib.map.VectorLayer.setLocked(boolean)' on a null object reference
via GitHub by takiainen
, 1 year ago
Unable to start activity ComponentInfo{dk.jens.backup/dk.jens.backup.Preferences}: java.lang.NullPointerException: Attempt to invoke virtual method 'void dk.jens.backup.AppInfoAdapter.setLocalTimestampFormat(boolean)' on a null object reference
via GitHub by RyanElliott94
, 6 months ago
Unable to start activity ComponentInfo{com.skintmedia.voice/com.braunster.chatsdk.activities.ChatSDKLoginActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean com.braunster.chatsdk.network.AbstractNetworkAdapter.facebookEnabled()' on a null object reference
java.lang.RuntimeException: Unable to start activity ComponentInfo{neerajshah.locationnearby/neerajshah.locationnearby.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void com.google.android.gms.maps.GoogleMap.setMyLocationEnabled(boolean)' on a null object reference
at neerajshah.locationnearby.MainActivity.onCreate(MainActivity.java:111)
at android.app.Activity.performCreate(Activity.java:6259)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1130)

Users with the same issue

You are the first who have seen this exception. Write a tip to help other users and build your expert profile.

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