I am importing geoJSON data from .jsons files. It works very well with some files but not with others. I thought my files had problems but I tested them on geojson lint as well as geojson.io without issues.
Here is the stack:
FATAL EXCEPTION: main
Process: com.example.andrea.blank_test, PID: 8780
java.lang.NoSuchMethodError: No virtual method isClickable()Z in class Lcom/google/android/gms/maps/model/PolylineOptions; or its super classes (declaration of 'com.google.android.gms.maps.model.PolylineOptions' appears in /data/data/com.example.andrea.blank_test/files/instant-run/dex/slice-dependencies_2c16afb1f7a3d667bc9f1bb08f04b953876fdec1-classes.dex)
at com.google.maps.android.geojson.GeoJsonLineStringStyle.toPolylineOptions(GeoJsonLineStringStyle.java:167)
at com.google.maps.android.geojson.GeoJsonRenderer.addLineStringToMap(GeoJsonRenderer.java:297)
at com.google.maps.android.geojson.GeoJsonRenderer.addFeatureToMap(GeoJsonRenderer.java:238)
at com.google.maps.android.geojson.GeoJsonRenderer.addFeature(GeoJsonRenderer.java:166)
at com.google.maps.android.geojson.GeoJsonRenderer.addLayerToMap(GeoJsonRenderer.java:117)
at com.google.maps.android.geojson.GeoJsonLayer.addLayerToMap(GeoJsonLayer.java:112)
Here is my very simple code
int d = R.raw.geojson;
try {
GeoJsonLayer layer = new GeoJsonLayer(map, d,
getApplicationContext());
layer.addLayerToMap();
} catch (Exception ex){
Log.e("hey", ex.toString());
}
And here is one of my JSONs causing that bug
build.gradle (project) and build.gradle(app)
Any idea is welcome