MapView in Android

I am trying to load google maps using expo MapView in my react-native app.Problem is the map is not loading except for the google symbol at the bottom.

I have checked my api key with another project and in the same device using the original react-native-maps library and it worked but i have to get it to work through expo because i am already using other expo features in the app.

Here is my MapScreen

import React, { Component } from "react";
import { View, Text } from "react-native";
import { MapView } from "expo";

class MapScreen extends Component {
 render() {
return (
  <View style={{ flex: 1 }}>
    <MapView style={{ flex: 1 }} />
  </View>
 );
 }
}

export default MapScreen;

My expo app.json file

{
 "expo": {
"name": "h391",
"description": "This project is really great.",
"slug": "jobs",
"privacy": "public",
"sdkVersion": "31.0.0",
"platforms": ["ios", "android"],
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/icon.png",
"splash": {
  "image": "./assets/splash.png",
  "resizeMode": "contain",
  "backgroundColor": "#ffffff"
},
"updates": {
  "fallbackToCacheTimeout": 0
},
"assetBundlePatterns": ["**/*"],
"ios": {
  "supportsTablet": true
},
"android": {
  "package": "com.helseyjobs.mapcuny",
  "config": {
    "googleMaps": { "apiKey": "AIzaSyA4_esIEC02ilwc_KAxF8QboV6lKcbcOBE" }
  }
}
}
}

Its in development mode and i want to see the map in development mode only.I put the apiKey here just as it says in Expo MapView docs.

Here is my package.json file :

{
"name": "empty-project-template",
"main": "node_modules/expo/AppEntry.js",
"private": true,
"scripts": {
"start": "expo start",
"android": "expo start --android",
"ios": "expo start --ios",
"eject": "expo eject"
 },
 "dependencies": {
 "expo": "^31.0.2",
 "lodash": "^4.17.11",
 "react": "16.5.0",
 "react-native": "https://github.com/expo/react-native/archive/sdk- 
   31.0.0.tar.gz",
  "react-native-elements": "^0.19.1",
 "react-navigation": "^2.18.2",
 "react-redux": "^5.1.0",
 "redux": "^4.0.1",
 "redux-thunk": "^2.3.0"
  },
 "devDependencies": {
  "babel-preset-expo": "^5.0.0"
   }
   }

I should be getting the google maps rendered but here is what i get instead

rendered in android 8.1.0

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