安装 'Google-Maps-iOS-Utils' 时,“'Pods' 目标具有包含静态二进制文件的传递依赖项”
'The 'Pods' target has transitive dependencies that include static binaries' when installing 'Google-Maps-iOS-Utils'
我正在尝试安装 'Google-Maps-iOS-Utils',但它给了我上述错误。
这是 Podfile:
platform :ios, '9.0'
use_frameworks!
target 'MapClusters' do
pod 'Alamofire'
pod 'SwiftyJSON'
pod 'GoogleMaps'
pod 'Google-Maps-iOS-Utils'
end
我尝试删除 pod 'Google-Maps-iOS-Utils'
并且成功了。所以我猜 Google-Maps-iOS-Utils 是导致问题的原因。这是完整的错误:
[!] The 'Pods-MapClusters' target has transitive dependencies that include static binaries: (/Users/BAPS/Documents/Test/MapClusters/Pods/GoogleMaps/Subspecs/Base/Frameworks/GoogleMapsBase.framework, /Users/BAPS/Documents/Test/MapClusters/Pods/GoogleMaps/Subspecs/Maps/Frameworks/GoogleMapsCore.framework, and /Users/BAPS/Documents/Test/MapClusters/Pods/GoogleMaps/Subspecs/Maps/Frameworks/GoogleMaps.framework)
我已经在这里或网络上的其他地方浏览了很多答案。
到目前为止,我已经尝试了这些解决方案:
禁用传递依赖项检查。
2.pre_install do |installer|
def installer.verify_no_static_framework_transitive_dependencies; end
end
post_install do |installer|
find Pods -regex 'Pods/GoogleMaps.*\.h' -print0 | xargs -0 sed -i '' 's/\(<\)GoogleMaps\/\(.*\)\(>\)/\"\2\"/'
find Pods -regex 'Pods/Google-Maps-iOS-Utils.*\.h' -print0 | xargs -0 sed -i '' 's/\(<\)Google-Maps-iOS-Utils\/\(.*\)\(>\)/\"\2\"/'
end
在 Podfile 中添加以上两点后,安装工作正常,但是当我尝试 运行 应用程序时,出现此错误:
删除后 pod 'SwiftyJSON'
它可以工作,但我需要它。
我也尝试了一些其他的东西,但似乎没有任何帮助。我是 ios 开发的新手,所以我无法帮助自己。
我正在使用 swift、xcode 7.3 和最新的 cocoapods。
请更新您的 pod 文件
platform :ios, '9.0'
use_frameworks!
target 'MapClusters' do
pod 'Alamofire'
pod 'SwiftyJSON'
pod 'GoogleMaps'
pod 'Google-Maps-iOS-Utils', :git => 'https://github.com/googlemaps/google-maps-ios-utils'
end
在 podfile 中使用此代码以避免 pod 安装时出错:
pre_install do |installer|
def installer.verify_no_static_framework_transitive_dependencies; end
end
但仍然需要 pod 库的解决方案。
我经过一番努力才弄明白这一点。根据要求 google 人在他们的 git 存储库中放置了一个教程。
Here is the link
我正在尝试安装 'Google-Maps-iOS-Utils',但它给了我上述错误。 这是 Podfile:
platform :ios, '9.0'
use_frameworks!
target 'MapClusters' do
pod 'Alamofire'
pod 'SwiftyJSON'
pod 'GoogleMaps'
pod 'Google-Maps-iOS-Utils'
end
我尝试删除 pod 'Google-Maps-iOS-Utils'
并且成功了。所以我猜 Google-Maps-iOS-Utils 是导致问题的原因。这是完整的错误:
[!] The 'Pods-MapClusters' target has transitive dependencies that include static binaries: (/Users/BAPS/Documents/Test/MapClusters/Pods/GoogleMaps/Subspecs/Base/Frameworks/GoogleMapsBase.framework, /Users/BAPS/Documents/Test/MapClusters/Pods/GoogleMaps/Subspecs/Maps/Frameworks/GoogleMapsCore.framework, and /Users/BAPS/Documents/Test/MapClusters/Pods/GoogleMaps/Subspecs/Maps/Frameworks/GoogleMaps.framework)
我已经在这里或网络上的其他地方浏览了很多答案。 到目前为止,我已经尝试了这些解决方案:
禁用传递依赖项检查。
2.
pre_install do |installer| def installer.verify_no_static_framework_transitive_dependencies; end end
post_install do |installer| find Pods -regex 'Pods/GoogleMaps.*\.h' -print0 | xargs -0 sed -i '' 's/\(<\)GoogleMaps\/\(.*\)\(>\)/\"\2\"/'
find Pods -regex 'Pods/Google-Maps-iOS-Utils.*\.h' -print0 | xargs -0 sed -i '' 's/\(<\)Google-Maps-iOS-Utils\/\(.*\)\(>\)/\"\2\"/' end
在 Podfile 中添加以上两点后,安装工作正常,但是当我尝试 运行 应用程序时,出现此错误:
删除后 pod 'SwiftyJSON'
它可以工作,但我需要它。
我也尝试了一些其他的东西,但似乎没有任何帮助。我是 ios 开发的新手,所以我无法帮助自己。
我正在使用 swift、xcode 7.3 和最新的 cocoapods。
请更新您的 pod 文件
platform :ios, '9.0'
use_frameworks!
target 'MapClusters' do
pod 'Alamofire'
pod 'SwiftyJSON'
pod 'GoogleMaps'
pod 'Google-Maps-iOS-Utils', :git => 'https://github.com/googlemaps/google-maps-ios-utils'
end
在 podfile 中使用此代码以避免 pod 安装时出错:
pre_install do |installer|
def installer.verify_no_static_framework_transitive_dependencies; end
end
但仍然需要 pod 库的解决方案。
我经过一番努力才弄明白这一点。根据要求 google 人在他们的 git 存储库中放置了一个教程。 Here is the link