接手RN项目遇到的问题及解决 自用

npm install 使用出现[email protected]: Permission denied (publickey)_iu№的博客-CSDN博客

1. The 'Pods-Agent' target has libraries with conflicting names: libcrypto.a and libssl.a.
解决方案: 
    iOS pod install时OpenSSL-Universal和BaiduMapKit组件引入了相同的静态库报错,需要在package.json文件中注释百度地图的依赖,然后pod install, 安装成功后删除pods文件夹中OpenSSL-Universal/ios/lib下的libcrypto.a和libssl.a静态库,然后打开package.json中百度地图的依赖,再进行pod install.


2. undefined is not an object(evaluating '_this.view._component.measurelnWindow')
解决方案:
    node_modules/reacdt-native-safe-area-view/index.js,找到this.view._component.measurelnWindow修改为this.view.getNode().measureInWindow


3. android 错误: 程序包android.support.annotation不存在    
解决方案:
    在错误信息中找到出现该问题的文件,将import android.support.annotation.Nullable;修改为import androidx.annotation.Nullable;

4.android null is not an object (evaluating '_RNGestureHandlerModule.default.Direction
解决方案:
  React Navigation 集成 null is not an object (evaluating '_RNGestureHandlerModule.default.Direction')_其实_挺好的博客-CSDN博客
5.

【git】npm install报错“[email protected]: Permission denied (publickey)”解决办法_RogerQianpeng的博客-CSDN博客

6. 遇到问题版本冲突问题 可以 --force  /--legacy-peer-deps

你可能感兴趣的:(react,native)