【问题标题】:Transitive dependencies error while installing cocoa pods安装可可豆荚时出现传递依赖错误
【发布时间】:2015-09-24 20:37:57
【问题描述】:

我想在我的应用程序中集成“使用 google 登录”。我尝试使用 pod,但出现如下错误:

'Pods-ProjectName' 目标具有传递依赖关系,包括静态二进制文件:ProjectPath/GoogleAppUtilities/Libraries/libOpenInChrome.a

我的Pod文件代码如下:

target 'ProjectName' do

use_frameworks!

pod "OAuthSwift", "~> 0.3.4"
pod "Haneke", "~> 1.0"
pod "Alamofire", "~> 1.2"
pod "IJReachability", :git => "https://github.com/Isuru-Nanayakkara/IJReachability.git"
pod "iCarousel"
pod 'SDWebImage', '~>3.7'
pod 'Google/SignIn'

end

我也在使用 Crashlytics。如果没有Google/signIn,我可以成功创建 Pod 工作区。

对此有任何解决方案。

【问题讨论】:

  • 请提供您的 Podfile 代码
  • 我尝试在 target 'TestProject' doend 之间添加 pod 'GoogleSignIn' 行,然后使用终端中的 pod install 正确添加了依赖项。
  • @aramusss 我编辑了我的问题并添加了我的 pod 文件代码。
  • 尝试使用pod 'GoogleSignIn',然后 pod install 和 pod update
  • @aramusss 我试过这个。仍然出现同样的错误。

标签: ios iphone cocoapods google-signin


【解决方案1】:

关于cocoapods documentation for version 0.36,您不能将静态库添加到您的项目中。 Google pod 似乎依赖于一些静态库,导致 pod install 崩溃。

如果你使用 ObjectiveC,并且你删除了 use_frameworks! 部分,你就没有问题了。

当然,另一种选择是将 Google 库直接添加到项目中,这样您就不会使用 cocoapods。

【讨论】:

    【解决方案2】:

    将以下代码行添加到您的 pod 文件以忽略传递依赖项:

    pre_install do |installer|
        def installer.verify_no_static_framework_transitive_dependencies 
        end
    end
    

    如果您使用像 MIHCrypto 之类的 podfile,则使用静态库添加所有依赖库到项目并将 mach-O-Type 更改为静态,如下所示:

    【讨论】:

      【解决方案3】:

      转到您的 podfile 并插入以下内容

      pre_install do |installer|
      def installer.verify_no_static_framework_transitive_dependencies; end
      end
      

      这对我有用。

      【讨论】:

        猜你喜欢
        • 2019-11-27
        • 2015-10-02
        • 1970-01-01
        • 2018-04-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2015-07-18
        相关资源
        最近更新 更多