Google Maps blank / not loading on Android

#1

Hello. I noticed that Google Maps is not loading in MapView in Android in development mode. Everything seems to work fine on iOS though.

Did I miss some additional settings for Android?

My component:

import { View, Text } from 'react-native';
import React from 'react';
import Components from 'expo';

class MapScreen extends React.Component {
    static navigationOptions = {
        title: 'Welcome',
    };
    render() {
        const { navigate } = this.props.navigation;
        return (
            <View style={{ flex: 1 }}>
                <Components.MapView
                    provider={Components.MapView.PROVIDER_GOOGLE}
                    style={{ flex: 1 }}
                    liteMode={true}
                    initialRegion={{
                        latitude: 37.78825,
                        longitude: -122.4324,
                        latitudeDelta: 0.0922,
                        longitudeDelta: 0.0421,
                    }}
                /> 
                <Text style={{ flex: 1}}>Hello world. </Text>
            </View>
        );
    }
}
    
export default MapScreen;

package.json dependencies:

  "dependencies": {
    "expo": "^30.0.2",
    "expo-cli": "^2.2.5",
    "parcel-bundler": "^1.10.1",
    "react": "^16.5.2",
    "react-art": "^16.5.2",
    "react-dom": "^16.5.2",
    "react-native": "https://github.com/expo/react-native/archive/sdk-30.0.0.tar.gz",
    "react-native-web": "^0.9.1",
    "react-navigation": "^2.18.2",
    "react-redux": "^5.0.7",
    "redux": "^4.0.0",
    "redux-thunk": "^2.3.0",
    "whatwg-fetch": "^2.0.4"
  },
  "devDependencies": {
    "babel-core": "^6.26.3",
    "babel-plugin-module-resolver": "^3.1.1",
    "babel-preset-expo": "^4.0.0",
    "cross-env": "^5.2.0"
  }
#2

Hi. I’m facing with the same issue. Also posted a message on Slack, but still no solution.
I’m pretty sure is due to a wrong or missed Google Maps API Key, but I don’t know how to set my own key using the Expo Client app.

#3

I wonder if it’s simply stuck / bugged, becuase it doesn’t respond to zooming in and out by pinching, nor does it load a map from a tile server using UrlTile.

#4

I have no issues on Android with the newest sdk (v31) and an added Google Maps API Key.
But I had the exact same behaviour you described using the expo app (even without restricting the API Key).

#5

Same here.

I think that’s probably the case too. :slight_smile:
Unfortunately I don’t think in development mode the API key we set in app.json takes precedence over the default one.

#6

Hmm. Unfortunately upgrading to v31 doesn’t solve anything for me, tried with a blank project too. My Android is a Sony Xperia XZ running Android 8.0.0. (Time to get a new phone? :thinking:)

#7

Hi.

We’re really sorry for the inconvenience. Our team knows about this issue and is working right now to solve it.

3 Likes
closed #8

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.