RN百度地图conflicting names: libcrypto.a and libssl.a.

报错如下:

-> 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/ 下的文件,重新执行 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-b6a8f

itkey@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 已经不在报错了。


---------教程结束,希望对你有所帮助--------

你可能感兴趣的:(RN百度地图conflicting names: libcrypto.a and libssl.a.)