react-native相关问题集锦

报错:‘Could not parse the simulator list output’

解决:更新Xcode组件
参考:

报错:‘Agreeing to the Xcode/iOS license requires admin privileges’

解决sudo xcodebuild -license协议相关
参考:

报错:xcrun: error: unable to find utility "instruments", not a developer tool or in PATH

解决sudo xcode-select -s /Applications/Xcode.app/Contents/Developer/

通过npm安装包之后项目运行失败

解决: 这是npm@5.x的一个坑,降级npm版本到4.x即可

使用axios的request库在ios上面报网络错误

解决:使用https

浏览器调试报错Cannot set property 'volume' of null

解决: 摇一摇设备,打开enable remoteJs debug, 关闭然后重新打开调试界面

安装失败报错:

Failed to finalize session : INSTALL_FAILED_UPDATE_INCOMPATIBLE: Package com.kindergarten.teacher.app signatures do not match the previously installed version; ignoring!

解决: 卸载手机上原本装的app

adb uninstall <package name>

参考:

  1. https://stackoverflow.com/questions/39810470/hello-world-program-for-react-native-throws-could-not-parse-the-simulator-lis
  2. https://blog.csdn.net/yabusai/article/details/37690783
  3. https://www.jianshu.com/p/e6d8d57fe6a6
  4. https://www.jianshu.com/p/e6d8d57fe6a6
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容