2

CocoaPods 更新到 1.2,现在出现错误。

这是我的 POD:

# Uncomment this line to define a global platform for your project
# platform :ios, '8.0'
# Uncomment this line if you're using Swift
# use_frameworks!

target 'myapp' do
pod "MTDirectionsKit", "~> 1.7.0"
pod 'GoogleMaps'
end

当我尝试更新 POD 时,我收到此错误:

-> Installing MTDirectionsKit (1.7.0)
  > Copying MTDirectionsKit from `/Users/abd/Library/Caches/CocoaPods/Pods/Release/MTDirectionsKit/1.7.0-1e8c5` to `Pods/MTDirectionsKit`
  - Running pre install hooks
[!] The 'Pods-myapp' target has frameworks with conflicting names: googlemaps.framework.
4

1 回答 1

0

pod update PODNAME当我使用 CocoaPods 版本 1.11.2运行以下命令时,我看到了这个问题。

这是我的终端输出:

$ pod update Pilgrim
Updating local specs repositories
Analyzing dependencies
Downloading dependencies
[!] The 'Pods-AppName' target has frameworks with conflicting names: pilgrim.framework.

解决:

在 Finder 中,导航到有问题的 Pod 文件夹。AppName> Pods> PODNAME。现在我看到 Pod 有两个版本(在我的例子中,Pod 被命名为 Pilgrim)。

删除旧版本(因为我们正在更新 pod)。就我而言,我删除了名为Pilgrim-2.4.2. Finder 的屏幕截图,其中显示了同一 pod 的两个冲突版本 现在再次运行命令:

$ pod update Pilgrim
Updating local specs repositories
Analyzing dependencies
Downloading dependencies
Generating Pods project
Integrating client project
Pod installation complete! There are 10 dependencies from the Podfile and 20 total pods installed.

有用!

于 2021-12-10T20:33:36.133 回答