react-native常见错误整理

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模式

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

时间: 2024-08-05 16:18:44

react-native常见错误整理的相关文章

Rreact Native 常见错误总结

1.invariant violation:expected a component class,got[object object]        创建自定义组件首字母要大写,否则会报错.       2.Module 0 is not a registered callable module. 将gradle升级成最新版本(cd android 进入android目录执行:sudo ./gradlew clean) 或者通过android studio工具升级. 3.android.view

Hibernate常见错误整理

Hibernate常见错误合集 1.错误:object references an unsaved transient instance - save the transient instance before flushing: com.xxxx.bean.java.Sysblog; nested exception is org.hibernate.TransientObjectException: object references an unsaved transient instanc

JNI常见错误整理

ndk开发常见错误1. android.mk文件不存在 $ ndk-buildAndroid NDK: Your APP_BUILD_SCRIPT points to an unknown file: ./jni/Android.mk /cygdrive/h/heima6/jni2/ziliao/android-ndk-r7b/build/core/add-application.mk:133: *** Android NDK: Aborting... . 停止. 2.android.mk文件

react native 学习资料整理

入门教程 深入浅出 React Native:使用 JavaScript 构建原生应用 http://www.appcoda.com/react-native-introduction/  中文版 http://www.cocoachina.com/ios/20150408/11513.html react-native 之布局篇 https://segmentfault.com/a/1190000002658374 Flex布局入门 http://www.ruanyifeng.com/blog

github常见错误整理!

1.fatal: remote origin already exists.错误 如果输入$ Git remote add origin [email protected]:github帐号名/项目名.git 提示出错信息:fatal: remote origin already exists. 解决办法如下: 1>.先输入$ git remote rm origin 2>.再输入$ git remote add origin [email protected]:djqiang/gitdemo

MySQL安装常见错误整理

问题一:#mysql ERROR 1045 :Access denied for user 'root'@'localhost' (using password:NO) 问题原因:初始化问题 解决方法:删除data目录重建,重新初始化. 问题二: 当各位在安装.重装时出现could not start the service mysql error:0原因: 卸载mysql时并没有完全删除相关文件和服务,需要手动清除 问题三: make[2]: *** No rule to make targe

React Native编译错误:ReactAndroid:buildReactNdkLib FAILED

错误输出入如下: [armeabi-v7a] Compile++ : reactnativejni <= Dummy.cpp make: /Users/qisen/adt-bundle/android-ndk-r12b/toolchains/arm-linux-androideabi-4.8/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-g++: No such file or directory [armeabi-v7a] Compile++

ios 常见错误整理 持续更新

本文转载至 http://blog.csdn.net/yesjava/article/details/8086185 1. mutating method sent to immutable object' 从字面上理解:可变的消息发给了不可变的对象.比如NSDictionary类型的对象调用setValue方法.应该把NSDictionary 改成NSMutableDictionary类型.   2.Local declaration of 'content' hides instance v

Django笔记-常见错误整理

1.csrf错误 解决方法:在settings.py里注释掉相关内容即可 MIDDLEWARE_CLASSES = ( 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', #'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.Authenticat