java.lang.NullPointerException: Attempt to invoke virtual method 'android.view.View android.view.View.findViewById(int)' on a null object reference


Solutions on the web

Solution icon of github
via GitHub by spyhunter99
, 9 months ago
Attempt to invoke virtual method 'android.view.View android.view.View.findViewById(int)' on a null object reference

Stack trace

java.lang.NullPointerException: Attempt to invoke virtual method 'android.view.View android.view.View.findViewById(int)' on a null object reference
	at org.osmdroid.views.overlay.infowindow.MarkerInfoWindow.onOpen(MarkerInfoWindow.java:58)
	at org.osmdroid.views.overlay.infowindow.InfoWindow.open(InfoWindow.java:79)
	at org.osmdroid.views.overlay.Marker.showInfoWindow(Marker.java:264)
	at org.osmdroid.views.overlay.Marker.onMarkerClickDefault(Marker.java:414)
	at org.osmdroid.views.overlay.Marker.onSingleTapConfirmed(Marker.java:353)
	at org.osmdroid.views.overlay.DefaultOverlayManager.onSingleTapConfirmed(DefaultOverlayManager.java:237)
	at org.osmdroid.views.MapView$MapViewDoubleClickListener.onSingleTapConfirmed(MapView.java:1381)
	at android.view.GestureDetector$GestureHandler.handleMessage(GestureDetector.java:300)
	at android.os.Handler.dispatchMessage(Handler.java:102)
	at android.os.Looper.loop(Looper.java:148)
	at android.app.ActivityThread.main(ActivityThread.java:5417)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)

Write tip

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

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.