ReactNative入门之iOS Image无法显示http图片问题

准备入门ReactNative, 写了个Image显示网络图片的

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

export default class App extends React.Component{
  render(){
      let picUrl = {
          uri: "http://xxxx.jpg"
      }
      return (
        
            
        
      );
  };
}
AppRegistry.registerComponent('HelloWorld', () => App);

运行在iOS模拟器上,无法显示图片,2种解决方案:

  1. uri 整个 https 的网络图片路径,搞定!

  2. Info.list加个Allow Arbitrary Loads -> Yes
    模拟器上 系统设置(Settings) -> Developer -> Allow HTTP Services这个打开

你可能感兴趣的:(ReactNative入门之iOS Image无法显示http图片问题)