【问题标题】:Duplicate symbols between two Google pods两个 Google pod 之间的符号重复
【发布时间】:2016-04-25 05:44:22
【问题描述】:

我知道duplicate symbol 是一个反复出现的问题,但这是一个特殊的问题,或者至少我在 iOS 开发方面的知识对我没有帮助。

我曾经在我的最终应用程序中使用 GooglePlayGames (GPG),在我的 SDK 中使用 GoogleCloudMessaging (GCM),但今天由于某种原因,事情开始爆炸(想法:由于上次 GCM 更新,但我无法获得旧版本)

考虑到我的 SDK 中的最后一个版本的 GCM,我有:

Podfile

pod 'MySDK'                 # All good
pod 'Google/CloudMessaging' # Nothing special...

输出

$ pod update
Update all pods
Updating local specs repositories
Analyzing dependencies
Downloading dependencies
...
Installing GGLInstanceID (1.1.5)                 # Dependencies
Installing Google (1.3.2)                        # relative to GCM
Installing GoogleCloudMessaging (1.1.2)            
Installing GoogleIPhoneUtilities (1.1.1)
Installing GoogleInterchangeUtilities (1.1.0)
Installing GoogleNetworkingUtilities (1.0.0)
Installing GoogleSymbolUtilities (1.0.3)
Installing GoogleUtilities (1.1.0)
...
Generating Pods project
Integrating client project

在我的最终申请中:

Podfile

pod 'GooglePlayGames' # Nothing special...

输出

$ pod update
Update all pods
Updating local specs repositories
Analyzing dependencies
Downloading dependencies
...
Installing GoogleAppUtilities (1.0.0)           # Dependencies relative
Installing GoogleAuthUtilities (1.0.1)          # to GPG
Installing GooglePlayGames (5.0)
Installing GooglePlusOpenSource (1.7.1)
Installing GoogleSignIn (2.4.0)
...
Generating Pods project
Integrating client project

当我构建我的最终应用程序时,这是我遇到的错误(明确但我没有找到任何解决方案......)

duplicate symbol _OBJC_CLASS_$_GIPLocale in:
/Users/Path/To/App/Pods/GoogleIPhoneUtilities/Libraries/libGIP_Locale.a(GIPLocale.o)
/Users/Path/To/App/Pods/GooglePlayGames/gpg-cpp-sdk/ios/gpg.framework/gpg(GIPLocale.o)

据我了解,我有两次GIPLocale,这使我有重复的符号。如果我们看一下相关的 Pod,一个属于 GPG,另一个属于 GCM

我尝试了很多东西,但都没有成功。 这可以很容易地用一个空项目重现,并在同一个 Podfile 中添加两个依赖项。请注意,ENABLE_BITCODE 必须被禁用。

可能是一些愚蠢的东西,在某个地方,在 Xcode 配置中丢失了......

【问题讨论】:

  • 我之前已经看过这个页面,我又试了一次,但它与我的情况并不相符。我在 GCM Github 上发布了一个问题,似乎有一个真正的错误。您可以查看我的答案中的链接。谢谢。

标签: ios google-cloud-messaging cocoapods google-play-games


【解决方案1】:

我在Google Clound Messaging Github 上创建了same issue,答案很明确,这是他们需要修复的错误。

希望它很快就会到来。

【讨论】:

    【解决方案2】:

    您是否尝试过删除第一个库 (libGIPLocale.a)?这听起来绝对像是两个库都直接使用同一个内部库的问题(所以真正的修复不在你的端),但如果他们试图获取的代码是相同的,那么就不要试图副本中的链接可以很好地解决您的链接问题。

    【讨论】:

    • 我做了,但在我的应用程序启动时 GCM 初始化期间出现错误。 ([GIPLocale legalDocsLanguageForPreferences:]: unrecognized selector) 现在我正在等待 Google 的修复。
    • 有什么解决办法吗?我仍然有这个最新版本的错误
    • 还有。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-08-07
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多