尝试使用 Admob 构建应用时出现架构未定义符号 x86_64 错误
Undefined symbols for architecture x86_64 error when trying to build app with Admob
我刚刚将 google admob 集成到我的 iOS 应用中。编译时出现以下错误:
Undefined symbols for architecture x86_64:
"_CACurrentMediaTime", referenced from:
l858 in GoogleMobileAds(flat-x86_64)
"_CVBufferGetAttachment", referenced from:
l2558 in GoogleMobileAds(flat-x86_64)
"_CVOpenGLESTextureCacheCreate", referenced from:
l2560 in GoogleMobileAds(flat-x86_64)
"_CVOpenGLESTextureCacheCreateTextureFromImage", referenced from:
l2561 in GoogleMobileAds(flat-x86_64)
"_CVOpenGLESTextureCacheFlush", referenced from:
l2559 in GoogleMobileAds(flat-x86_64)
"_CVOpenGLESTextureGetName", referenced from:
l2561 in GoogleMobileAds(flat-x86_64)
类似的错误还有很多。我将 admob 与 firebase 分开安装,因为我不想使用 firebase,只使用 admob。我怎样才能解决这个问题?
将框架"CoreGraphics"添加到您的项目中就可以了。
将Admob框架自带的所有框架添加到项目中。
以后,您可以随时Google它所指的未定义符号来找出您缺少的框架。在这种情况下 Google CACurrentMediaTime
, which is referenced from QuartzCore
。因此,要解决您的问题,您需要 import QuartzCore
.
我最终从这个 link 中得到了答案:
Admob 有其他框架,他们在 tutorial.The 图片中没有提及上面 link 的图片发布在下面。
我没有将此标记为答案,因为从技术上讲,Daniel Storm 的答案是导致我找到这个 Whosebug link 的原因。通过谷歌搜索符号,您可以找到解决任何此类错误的框架。
我刚刚将 google admob 集成到我的 iOS 应用中。编译时出现以下错误:
Undefined symbols for architecture x86_64:
"_CACurrentMediaTime", referenced from:
l858 in GoogleMobileAds(flat-x86_64)
"_CVBufferGetAttachment", referenced from:
l2558 in GoogleMobileAds(flat-x86_64)
"_CVOpenGLESTextureCacheCreate", referenced from:
l2560 in GoogleMobileAds(flat-x86_64)
"_CVOpenGLESTextureCacheCreateTextureFromImage", referenced from:
l2561 in GoogleMobileAds(flat-x86_64)
"_CVOpenGLESTextureCacheFlush", referenced from:
l2559 in GoogleMobileAds(flat-x86_64)
"_CVOpenGLESTextureGetName", referenced from:
l2561 in GoogleMobileAds(flat-x86_64)
类似的错误还有很多。我将 admob 与 firebase 分开安装,因为我不想使用 firebase,只使用 admob。我怎样才能解决这个问题?
将框架"CoreGraphics"添加到您的项目中就可以了。
将Admob框架自带的所有框架添加到项目中。
以后,您可以随时Google它所指的未定义符号来找出您缺少的框架。在这种情况下 Google CACurrentMediaTime
, which is referenced from QuartzCore
。因此,要解决您的问题,您需要 import QuartzCore
.
我最终从这个 link 中得到了答案:
Admob 有其他框架,他们在 tutorial.The 图片中没有提及上面 link 的图片发布在下面。
我没有将此标记为答案,因为从技术上讲,Daniel Storm 的答案是导致我找到这个 Whosebug link 的原因。通过谷歌搜索符号,您可以找到解决任何此类错误的框架。