java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String com.google.maps.android.geojson.GeoJsonFeature.getProperty(java.lang.String)' on a null object reference

tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    GeoJSON onClickListener not working on Polygons

    Stack Overflow | 5 months ago | TheTestSpecimen
    java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String com.google.maps.android.geojson.GeoJsonFeature.getProperty(java.lang.String)' on a null object reference

    Root Cause Analysis

    1. java.lang.NullPointerException

      Attempt to invoke virtual method 'java.lang.String com.google.maps.android.geojson.GeoJsonFeature.getProperty(java.lang.String)' on a null object reference

      at com.thetestspecimen.worldmap.EuroMap$1.onFeatureClick()
    2. com.thetestspecimen.worldmap
      EuroMap$1.onFeatureClick
      1. com.thetestspecimen.worldmap.EuroMap$1.onFeatureClick(EuroMap.java:135)
      1 frame
    3. com.google.maps
      GeoJsonLayer$1.onPolygonClick
      1. com.google.maps.android.geojson.GeoJsonLayer$1.onPolygonClick(GeoJsonLayer.java:97)
      1 frame
    4. com.google.android
      zzz$zza.onTransact
      1. com.google.android.gms.maps.GoogleMap$14.zza(Unknown Source)
      2. com.google.android.gms.maps.internal.zzz$zza.onTransact(Unknown Source)
      2 frames
    5. Android Platform
      Binder.transact
      1. android.os.Binder.transact(Binder.java:387)
      1 frame