今天在写一个简单的RN的Demo时,一连出现了好几个错误,最后幸亏得以解决,在这里把我踩过的坑以及解决办法分享出来: 1.运行出现错误:Could not connect to development server. 解决办法: 请将项目中 AppDelegate.m 中的 jsCodeLocation = [NSURL URLWithString:@"http://localhost:8081/index.ios.bundle?platform=ios&dev=true"];
当我们点Debug Android时,会弹出以下错误 Could not debug. Unable to set up communication with VSCode react-native extension. Is this a react-native project, and have you made sure that the react-native npm package is installed at the root? 解决方法:当时我全局安装的react-nativ
概述 前面我们介绍过在window环境下开发React Native项目,今天说说怎么在mac上搭建一个RN的开发环境. 配置mac开发环境 基本环境安装 1.先安装Homebrew:用于安装NodeJS和其他工具. 注:Homebrew详解,对这个比较了解的略过,我也是用mac没多久,这里给小白普及下. Homebrew全称Homebrew is the easiest and most flexible way to install the UNIX tools Apple didn't i