码迷,mamicode.com
首页 > 其他好文 > 详细

react-native常见错误整理

时间:2019-03-22 14:16:43      阅读:300      评论:0      收藏:0      [点我收藏+]

标签:weight   android   rom   包名   out   cache   back   png   blog   

1、CFBundleIdentifier", Does Not Exist

sudo rm -rf node_modules && rm -rf ~/.rncache && yarn

sudo npm install -g react-native-git-upgrade

 

 

2、Build input file cannot be found: ‘xxx/third-party/double-conversion-1.1.5/‘…

新建的React  Native 项目,凡是版本号大于0.45的,iOS版本在build的时候会卡在build double conversion 这里。

 

3、third-party/glog-0.3.4/src/base/mutex.h:105:10: ‘config.h‘ file not found

cd node_modules/react-native/third-party/glog-0.3.4

../../scripts/ios-configure-glog.sh

 

4、React Native version mismatch

技术图片

 

 

watchman watch-del-all && react-native start --reset-cache

This might be related to https://github.com/facebook/react-native/issues/4968

To resolve try the following:

  1. Clear watchman watches: `watchman watch-del-all`.

  2. Delete the `node_modules` folder: `rm -rf node_modules && npm install`.

  3. Reset Metro Bundler cache: `rm -fr $TMPDIR/react-*` or `npm start -- --reset-cache`.

 

 

5、权限问题

chown -R wood:staff ~/.npm 让该目录下的所有文件都有wood用户权限

groups 查看当前用户所属组

groups wood 查看指定用户所属组

id -a wood 可以查到指定用户所属组更详细的信息

whoami 查看当前用户的用户名

 

6、Execution failed for task ‘:app:installDebug‘.

at com.android.ddmlib.Device.installPackage(Device.java:869)

> com.android.builder.testing.api.DeviceException: com.android.ddmlib.InstallException: INSTALL_FAILED_INSUFFICIENT_STORAGE

at com.android.builder.testing.ConnectedDevice.installPackage

是因为包名和签名的信息与原先手机上的冲突,最简单的方式,通过adb uninstall packageName将原来的App卸载干净,重新执行就可以成功了

 

7、Attempted to transition from state RESPONDER_INACTIVE_PRESS_IN to RESPONDER_ACTIVE_LONG_PRESS_IN, which is not supported. This is most likely due to Touchable.longPressDelayTimeout not being cancelled.

https://github.com/facebook/react-native/issues/5823

这是开启了Debug JS Remotely模式

react-native常见错误整理

标签:weight   android   rom   包名   out   cache   back   png   blog   

原文地址:https://www.cnblogs.com/wood-life/p/10577812.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!