Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libRCTMJRefreshHeader.a找不到问题还是没有解决啊!! #43

Open
geniu-vs opened this issue Jun 21, 2019 · 1 comment
Open

Comments

@geniu-vs
Copy link

geniu-vs commented Jun 21, 2019

react-native项目中接入MJRefresh,link完,debug没问题,打包报错:
clang: error: no such file or directory: ‘***/Intermediates.noindex/ArchiveIntermediates/KnowBall/BuildProductsPath/Release-iphoneos/libRCTMJRefreshHeader.a’

按#11的办法,将 RCTMJRefreshHeader lib 加入 Build Phases -> Target Dependencies 中,并将Build Phases -> Link Binary With Libraries中的libRCTMJRefreshHeader.a删掉。

打包是成功了,然而运行起来出问题了。

2019-06-21 09:23:44.070 [error][tid:com.facebook.react.JavaScript] Invariant Violation: requireNativeComponent: "RCTMJRefreshView" was not found in the UIManager.

This error is located at:
in RCTMJRefreshView

然后找到"RCTMJRefreshView" was not found in the UIManager解决方案里,解决方法是把libRCTMJRefreshHeader.a加到Link Binary With Libraries里,
大哥我就是这一步错了才搞到Target Dependencies里的,你这不就死循环了吗?

到底有没有一个完整的解决方案?

项目环境: target最低支持9.0, react-native:0.57.8
测试环境: iOS12.1.4 真机

@geniu-vs
Copy link
Author

终于搞定了!
解决办法:
第一步:libRCTMJRefreshHeader.a加到Link Binary With Libraries中
第二步:修改RCTMJRefreshHeader项目,iOS Deployment Target 改成跟你项目一致版本
第三步:找到你项目配置Build Settings —> Header Search Paths,把$(SRCROOT)/../node_modules/react-native-mjrefresh/ios/RCTMJRefreshHeader/RCTMJRefreshHeader删掉。
clean一下,重新打包。
如果不行,打开/Users/sj/Library/Developer/Xcode/DerivedData ,把里面的当前项目缓存删掉,再试一下。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant