error trying to use Polyline of MapView (Google maps)

I’m showing a google map with expo in React native (I’m using Expo), but when I try to draw a line with polyline, I get this this error:

Error while updating property ‘lineCap’ of a view managed by: AIRMapPolyline
Attempt to invoke virtual method ‘void…u.g(java.util.List) on a null object reference

This is the code:

                    latitude: initialLocation.latitude,
                    longitude: initialLocation.longitude,
                    latitudeDelta: 0.01,
                    longitudeDelta: 0.01
                    strokeColor='rgba(158, 158, 255, 1.0)'
                    fillColor='rgba(0, 0, 255, 0.3)'
                {drawLine && (
                        coordinates={ => {
                            return {
                                latitude: loc.coords.latitude,
                                longitude: loc.coords.longitude

The map draws ok, the circle shows ok, but when I try to draw a line, it throws that awful error.

The array of objects sent as coordinates is ok

The github is GitHub - rafaelsoteldosilva/maptest

You press Start Moving, then press Start Recording, wait a couple of seconds and press Draw, bum!, there’s the error


Hey @rafaelsoteldo, we have a github issue currently focusing on the Polyline Android issue. We’ll focus our efforts there!


Thank you for your answer. I follow the issue…

I have the same issue. Can’t upgrade SDK because of this

It works with EOS BUILD if you set the version react-native-maps version to 0.29.2 as the issue is fixed in that version.

Just run this in your project folder to get the right version:
npm install react-native-maps@0.29.2

And you package.json and package-lock.json should be uploaded like below.


    "react-native-maps": "^0.29.2",


    "react-native-maps": {
      "version": "0.29.2",
      "resolved": "",

But please note it will still not work in your development environment. Only in production. So your app will still crash in development.