小编Yas*_*ash的帖子

Android 模拟器未在屏幕上显示 Google 地图

我一直在尝试遵循这个https://github.com/airbnb/react-native-maps教程,我尝试了他们所说的所有内容,但在我的 android studio 模拟器上出现了空白屏幕。

我的截图

我的代码:

import React, { Component } from 'react';
import {
  AppRegistry,
  StyleSheet,
  Text,
  View
} from 'react-native';

import MapView from 'react-native-maps';

export default class ReactNativeMaps extends Component {
  render() {
   const { region } = this.props;
   console.log(region);

   return (
     <View style ={styles.container}>
       <MapView
         style={styles.map}
         region={{
           latitude: 39.1329,
           longitude: 84.5150,
           latitudeDelta: 0.015,
           longitudeDelta: 0.0121,
         }}
       >
       </MapView>
     </View>
   );
 }
}

const styles = StyleSheet.create({
  container: {
    position: 'absolute',
    top: 0,
    left: 0,
    right: 0, …
Run Code Online (Sandbox Code Playgroud)

android google-maps android-emulator react-native react-native-maps

8
推荐指数
3
解决办法
2万
查看次数

react-native run-android 和 react-native start

每次重新打开项目和模拟器时,我都必须在命令提示符下运行react-native run-androidreact-native start吗?

- 谢谢

android-studio react-native react-native-android

6
推荐指数
1
解决办法
8099
查看次数

使用Atom IDE React Native

如何将Atom IDE用于React Native App.我是编程和尝试在Android中开发应用程序的新手.

有人可以为此发布教程或链接.

- 谢谢

atom-editor react-native-android

5
推荐指数
1
解决办法
1万
查看次数