報錯如下:
-> Installing react-native-baidu-map (1.0.35)
? - Running pre install hooks
[!] The 'Pods-rndemo1' target has libraries with conflicting names: libcrypto.a and libssl.a.
The 'Pods-xx' target has libraries with conflicting names: libcrypto.a and libssl.a.
解決方法:
pod cache list | grep BaiduMapKit
刪除 pod 緩存中的 BaiduMapKit/thirdlibs/ 下的文件,重新執(zhí)行 pod install
詳細操作如下:
pod cache list | grep BaiduMapKit
itkey@MacBook-Pro ios % pod cache list | grep BaiduMapKit
BaiduMapKit:
? ? Spec:? ? /Users/itkey/Library/Caches/CocoaPods/Pods/Specs/Release/BaiduMapKit/4.2.podspec.json
? ? Pod:? ?
/Users/itkey/Library/Caches/CocoaPods/Pods/Release/BaiduMapKit/4.2.0-b6a8fitkey@MacBook-Pro ios %
需要斜線部分的信息肄梨。
進入/Users/itkey/Library/Caches/CocoaPods/Pods/Release/BaiduMapKit/4.2.0-b6a8f/BaiduMapKit/thirdlibs目錄下:
刪除thirdlibs下面所有文件
itkey@MacBook-Pro thirdlibs % pwd
/Users/itkey/Library/Caches/CocoaPods/Pods/Release/BaiduMapKit/4.2.0-b6a8f/BaiduMapKit/thirdlibs
itkey@MacBook-Pro thirdlibs % ls
libcrypto.a libssl.a
命令:
cd thirdlibs
rm *
itkey@MacBook-Pro thirdlibs % rm *
zsh: sure you want to delete all 2 files in /Users/itkey/Library/Caches/CocoaPods/Pods/Release/BaiduMapKit/4.2.0-b6a8f/BaiduMapKit/thirdlibs [yn]? y
重新pod install 已經(jīng)不在報錯了吉拳。
---------教程結束膝舅,希望對你有所幫助--------