ReactNative iOS 常见问题汇总

1 ReactNative iOS运行再次出错:No bundle URL present

原因:shadowocks 全局代理,导致之前可以正常连接到本地的packager的server,由于全局网络代理,从而需要绕道国外服务器,再去连接本地,所以无法正常访问
方法:去把此处Mac中用于科学上网的shadowocks中的网络代理,从 全局代理 改为 自动代理模式

ReactNative iOS 常见问题汇总_第1张图片
image

2 Reactnative——安装React Navigation后无法运行项目

原因:代码不完善
方法:复制以下代码到index.ios.js,并将NavTest改为项目app名称

import React, { Component } from 'react';
import { 
  AppRegistry,
  Button,
} from 'react-native';
import {
  StackNavigator,
} from 'react-navigation';



class HomeScreen extends Component {
  static navigationOptions = {
    title: 'Welcome',
  };
  render() {
    const { navigate } = this.props.navigation;
    return (
      

你可能感兴趣的:(ReactNative iOS 常见问题汇总)