小编Abr*_*azi的帖子

''Pods'目标在安装'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
Run Code Online (Sandbox Code Playgroud)

我试图删除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)
Run Code Online (Sandbox Code Playgroud)

我已经在这里或网上的其他地方经历了很多答案.直到现在我已经尝试过这些解决方案:

  1. 禁用对传递依赖项的检查.

    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开发的新手,所以我无法自拔. …

google-maps-markers ios cocoapods google-maps-sdk-ios swifty-json

8
推荐指数
1
解决办法
4469
查看次数