【发布时间】:2020-06-18 02:11:09
【问题描述】:
更新到 React Native 0.61.5 后,我在链接只能动态链接的库时遇到问题 (@react-native-mapbox-gl/maps)。
解决方案通常是在 Podfile 中启用动态库(设置 use_frameworks!)。但是,这会导致所有库都是动态的,并导致只能静态链接的库出现问题 (react-native-firebase)。
是否有任何解决方案可以满足这些相互冲突的要求?
当设置use_frameworks! 时,会在运行时抛出此错误:
dyld: Library not loaded: @rpath/MapboxMobileEvents.framework/MapboxMobileEvents
Referenced from: /private/var/containers/Bundle/Application/4A4F5BC3-2A1D-4949-9423-71EF7EFE79FD/ImmoWert2Go.app/Frameworks/Mapbox.framework/Mapbox
Reason: image not found
当use_frameworks!没有设置时,pod install会抛出这个错误:
[!] The 'Pods-ImmoWert2Go' target has transitive dependencies that include statically linked binaries: (FirebaseCore, FirebaseCoreDiagnostics, GoogleDataTransportCCTSupport, GoogleDataTransport, and FirebaseInstanceID)
【问题讨论】:
标签: ios react-native cocoapods react-native-firebase react-native-mapbox-gl