我在团结(iOS)中使用谷歌手机广告。我在链接期间使用Xcode构建。
它显示以下错误:
Undefined symbols for architecture arm64:
"_GADURequestInterstitial", referenced from:
_Externs_GADURequestInterstitial_m133 in Bulk_Assembly-CSharp_0.o
_IOSInterstitialClient_LoadAd_m201 in Bulk_Assembly-CSharp_0.o
(maybe you meant: _Externs_GADURequestInterstitial_m133_MethodInfo, _Externs_GADURequestInterstitial_m133 )
"_GADUCreateInterstitial", referenced from:
_Externs_GADUCreateInterstitial_m129 in Bulk_Assembly-CSharp_0.o
(maybe you meant: _Externs_GADUCreateInterstitial_m129, _Externs_GADUCreateInterstitial_m129_MethodInfo )
"_GADURequestBannerAd", referenced from:
_Externs_GADURequestBannerAd_m128 in Bulk_Assembly-CSharp_0.o
_IOSBannerClient_LoadAd_m162 in Bulk_Assembly-CSharp_0.o
(maybe you meant: _Externs_GADURequestBannerAd_m128, _Externs_GADURequestBannerAd_m128_MethodInfo )
"_GADUShowBannerView", referenced from:
_Externs_GADUShowBannerView_m126 in Bulk_Assembly-CSharp_0.o
_IOSBannerClient_ShowBannerView_m163 in Bulk_Assembly-CSharp_0.o
(maybe you meant: _Externs_GADUShowBannerView_m126_MethodInfo, _Externs_GADUShowBannerView_m126 )
"_GADUHideBannerView", referenced from:
_Externs_GADUHideBannerView_m125 in Bulk_Assembly-CSharp_0.o
_IOSBannerClient_HideBannerView_m164 in Bulk_Assembly-CSharp_0.o
(maybe you meant: _Externs_GADUHideBannerView_m125_MethodInfo, _Externs_GADUHideBannerView_m125 )
"_GADUSetBannerCallbacks", referenced from:
_Externs_GADUSetBannerCallbacks_m124 in Bulk_Assembly-CSharp_0.o
(maybe you meant: _Externs_GADUSetBannerCallbacks_m124, _Externs_GADUSetBannerCallbacks_m124_MethodInfo )
"_GADUCreateBannerView", referenced from:
_Externs_GADUCreateBannerView_m122 in Bulk_Assembly-CSharp_0.o
(maybe you meant: _Externs_GADUCreateBannerView_m122_MethodInfo, _Externs_GADUCreateBannerView_m122 )
"_GADUShowInterstitial", referenced from:
_Externs_GADUShowInterstitial_m132 in Bulk_Assembly-CSharp_0.o
_IOSInterstitialClient_ShowInterstitial_m203 in Bulk_Assembly-CSharp_0.o
(maybe you meant: _Externs_GADUShowInterstitial_m132, _Externs_GADUShowInterstitial_m132_MethodInfo )
"_GADUAddKeyword", referenced from:
_Externs_GADUAddKeyword_m116 in Bulk_Assembly-CSharp_0.o
(maybe you meant: _Externs_GADUAddKeyword_m116, _Externs_GADUAddKeyword_m116_MethodInfo )
"_GADURelease", referenced from:
_Externs_GADURelease_m121 in Bulk_Assembly-CSharp_0.o
_IOSBannerClient_set_BannerViewPtr_m160 in Bulk_Assembly-CSharp_0.o
_IOSBannerClient_CreateBannerView_m161 in Bulk_Assembly-CSharp_0.o
_IOSBannerClient_LoadAd_m162 in Bulk_Assembly-CSharp_0.o
_IOSBannerClient_DestroyBannerView_m165 in Bulk_Assembly-CSharp_0.o
_IOSInterstitialClient_set_InterstitialPtr_m199 in Bulk_Assembly-CSharp_0.o
_IOSInterstitialClient_CreateInterstitialAd_m200 in Bulk_Assembly-CSharp_0.o
...
(maybe you meant: _Externs_GADURelease_m121_MethodInfo, _Externs_GADURelease_m121 )
"_GADURemoveBannerView", referenced from:
_Externs_GADURemoveBannerView_m127 in Bulk_Assembly-CSharp_0.o
_IOSBannerClient_DestroyBannerView_m165 in Bulk_Assembly-CSharp_0.o
(maybe you meant: _Externs_GADURemoveBannerView_m127, _Externs_GADURemoveBannerView_m127_MethodInfo )
"_GADUTagForChildDirectedTreatment", referenced from:
_Externs_GADUTagForChildDirectedTreatment_m119 in Bulk_Assembly-CSharp_0.o
_IOSBannerClient_LoadAd_m162 in Bulk_Assembly-CSharp_0.o
_IOSInterstitialClient_LoadAd_m201 in Bulk_Assembly-CSharp_0.o
(maybe you meant: _Externs_GADUTagForChildDirectedTreatment_m119_MethodInfo, _Externs_GADUTagForChildDirectedTreatment_m119 )
"_GADUSetInterstitialCallbacks", referenced from:
_Externs_GADUSetInterstitialCallbacks_m130 in Bulk_Assembly-CSharp_0.o
(maybe you meant: _Externs_GADUSetInterstitialCallbacks_m130, _Externs_GADUSetInterstitialCallbacks_m130_MethodInfo )
"_GADUCreateSmartBannerView", referenced from:
_Externs_GADUCreateSmartBannerView_m123 in Bulk_Assembly-CSharp_0.o
(maybe you meant: _Externs_GADUCreateSmartBannerView_m123, _Externs_GADUCreateSmartBannerView_m123_MethodInfo )
"_GADUSetGender", referenced from:
_Externs_GADUSetGender_m118 in Bulk_Assembly-CSharp_0.o
_IOSBannerClient_LoadAd_m162 in Bulk_Assembly-CSharp_0.o
_IOSInterstitialClient_LoadAd_m201 in Bulk_Assembly-CSharp_0.o
(maybe you meant: _Externs_GADUSetGender_m118, _Externs_GADUSetGender_m118_MethodInfo )
"_GADUSetExtra", referenced from:
_Externs_GADUSetExtra_m120 in Bulk_Assembly-CSharp_0.o
(maybe you meant: _Externs_GADUSetExtra_m120_MethodInfo, _Externs_GADUSetExtra_m120 )
"_GADUSetBirthday", referenced from:
_Externs_GADUSetBirthday_m117 in Bulk_Assembly-CSharp_0.o
_IOSBannerClient_LoadAd_m162 in Bulk_Assembly-CSharp_0.o
_IOSInterstitialClient_LoadAd_m201 in Bulk_Assembly-CSharp_0.o
(maybe you meant: _Externs_GADUSetBirthday_m117, _Externs_GADUSetBirthday_m117_MethodInfo )
"_GADUAddTestDevice", referenced from:
_Externs_GADUAddTestDevice_m115 in Bulk_Assembly-CSharp_0.o
(maybe you meant: _Externs_GADUAddTestDevice_m115_MethodInfo, _Externs_GADUAddTestDevice_m115 )
"_GADUInterstitialReady", referenced from:
_Externs_GADUInterstitialReady_m131 in Bulk_Assembly-CSharp_0.o
_IOSInterstitialClient_IsLoaded_m202 in Bulk_Assembly-CSharp_0.o
(maybe you meant: _Externs_GADUInterstitialReady_m131_MethodInfo, _Externs_GADUInterstitialReady_m131 )
"_GADUCreateRequest", referenced from:
_Externs_GADUCreateRequest_m114 in Bulk_Assembly-CSharp_0.o
_IOSBannerClient_LoadAd_m162 in Bulk_Assembly-CSharp_0.o
_IOSInterstitialClient_LoadAd_m201 in Bulk_Assembly-CSharp_0.o
(maybe you meant: _Externs_GADUCreateRequest_m114, _Externs_GADUCreateRequest_m114_MethodInfo )
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
答案 0 :(得分:0)
主要问题是团结它无法运行/找到Cocoa pods主文件并自动安装Pods。 这就是我为解决问题所做的工作:
请确保在统一时,您没有任何关于无法构建pods文件的消息,因为Unity内部缺少pod。如果是这种情况,您需要更新/安装可可豆荚到您的mac。 Here有关如何在OS El Capitan上执行此操作的一些提示。但通常通过运行此命令你应该没问题:
sudo gem install -n / usr / local / bin cocoapods
然后关闭并重新开启团结。
打开你的Xcode文件夹,你应该有一个类似的文件:“youProjectName.xcworkspace
”。如果你拥有它,打开它,如果不是那意味着当Unity尝试在你的项目中运行PodFile时出错了。尝试手动运行PodInstall,您可以通过打开命令行,转到项目文件夹并命令命令:pod install
。确保Pod正确安装且没有任何错误。现在您应该看到“youProjectName.xcworkspace
”取决于您的主目录。
Id步骤2不起作用尝试删除所有Pods文件和目录,然后按照指示here添加并安装您自己的Pod。
如果仍然无法解决问题,则只使用可以下载here的Unity adMob sdks的旧版本。 this教程可以在不使用PodsFile的情况下手动安装google ad mob sdk。