ReactNative报错问题汇总,错误解决

  • 1.Svn checkout下来的文件,如果在在Mac电脑上运行,项目运行的时候出现以下错误 ,但是模拟器或者android环境已经安装完全,找不到其他问题

Could not install the app on the device, read the error above for details. Make sure you have an Android emulator running or a device connected and have set up your Android development environment’的错误

解决方法:在终端或黑窗口中输入以下代码+当前运行项目的路径

sudo chmod -R 777 “项目文件目录”
  • 2.ScrollView嵌套,ListView或FlatList数据不显示,需要碰/滑一下才会显示
removeClippedSubviews={false}
  • 3 . React Native 日常报错 ‘config.h’ file not found

解决方法:

cd node_modules/react-native/third-party/glog-0.3.4
../../scripts/ios-configure-glog.sh

clean the project and build again, the error is gone
其实执行 .sh 命令之后Terminal界面的一些处理流程,我们不难看出,这个命令是check .h头文件的引用情况,然后建立关联关系

  • 4 . Build input file cannot be find: '/node_module/Libraries/WebSocket/libfishhook.a’

类似这种报错,算是一种典型
在这里插入图片描述
解决方法:
选中Libraries下方项目 选中target build phases Link Binary With Libraries 重新添加依赖
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章