REACT NATIVE错误收集

Q1:

Build input file cannot be found: '/Users/xxx/Library/Developer/Xcode/DerivedData

  • A:X-Code 11.4 [File]->[Worksapce Settings]->[Per-User Workspace Settings]->build System 选择 Legacy Build System

Q2:

directory not found for option '-L-L/Users/xxx/Library/Developer/Xcode/DerivedData/Questionaire-grokfqiwdinmzodhwhvfuwgopznz/Build/Products/Debug-iphonesimulator/CocoaAsyncSocket

Q3:

'React/RCTBridgeDelegate.h' file not found

  • 出现在React-native 0.60.0以后版本
  • 解决方案
- Install Cocoa Pods
sudo gem install cocoapods

- In your Project Folder
cd ios && pod install

Q4: React-native打包android后出现莫名的启动闪退现象

A: 根据报错信息定位问题

  • 将android手机连接到pc,打开usb调试模式
adb logcat --buffer=crash

logcat打印的报错信息如:
no non-static method "facebook/react/bridge/ReactCallback incrementPendingJSCalls”
大概定位为运行时缺少了brdige的一个方法,原因是混淆器混淆后找不到方法了,可以将ReactCallBack类加入proguard-rules.pro, 缺少哪个增加哪个
-keep class com.facebook.react.bridge.ReactCallback { *; }

------------------------------------后续持续更新之前记录的问题方案,欢迎大家有新的问题下方留言-----------------------------------------------------------

Q: CFBundleIdentifier", Does Not Exist
A: File -> WorkSpace settings -> Advanced - > Custome -> Relative to Workspace -> Products和Intermediates前添加build.

image.png

image.png

Q5: CFBundleIdentifier, Does Not Exist

A: 终极方案

Q6: "/Users/**/ios/**/**.entitlements" could not be opened

The file "/Users/**/ios/**/**.entitlements" could not be opened. Verify the value of the CODE_SIGN_ENTITLEMENTS build setting for target "csyplus" is correct and that the file exists on disk.

A: 将Code signing Evtitlements置空

image.png

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容