Change the color of polyline in android google map v2
问题 I have this code found from this link https://developers.google.com/maps/documentation/android/shapes#customizing_appearances Polyline line = map.addPolyline(new PolylineOptions() .add(new LatLng(-37.81319, 144.96298), new LatLng(-31.95285, 115.85734)) .width(25) .color(Color.BLUE) .geodesic(true)); My Problem is Color in Color.Blue returns an error saying The name Color does not exist in the current context. 回答1: Just define a color in your colors resources file and do this: PolylineOptions