大图不显示在反应本机

问题描述:

试图加载大图像无法反应本机。使用较小的图像按预期工作,但大图像不会显示,也不会引发错误。大图不显示在反应本机

React-native有多大的图像限制?或在Android?

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

export default class RobberJob extends Component { 
    render() { 
    return (
     <View style={styles.container}> 
     <Text style={styles.welcome}> 
      Welcome to React Native! 
     </Text> 
     <Text style={styles.instructions}> 
      To get started, edit index.android.js 
     </Text> 
     <Text style={styles.instructions}> 
      Double tap R on your keyboard to reload,{'\n'} 
      Shake or press menu button for dev menu 
     </Text> 
     <Image source={require('./assets/map.png')} style={{width:200, height:200}} /> 
     </View> 
    ); 
    } 
} 

const styles = StyleSheet.create({ 
    container: { 
    flex: 1, 
    justifyContent: 'center', 
    alignItems: 'center', 
    backgroundColor: '#F5FCFF', 
    }, 
    welcome: { 
    fontSize: 20, 
    textAlign: 'center', 
    margin: 10, 
    }, 
    instructions: { 
    textAlign: 'center', 
    color: '#333333', 
    marginBottom: 5, 
    }, 
}); 

AppRegistry.registerComponent('RobberJob',() => RobberJob); 
+0

它所表现出任何错误或空白? –

如果您的图片真的很大,请稍等片刻,直到它被加载。或者你的形象只是白色?! ;-)

这里有一个大的(5360×3560)图像的代码,它的工作:https://repl.it/Iqe9