我的 RubyMotion 项目构建良好,但在链接阶段失败,特别是在链接时失败,GoogleAdMobAds
出现“重复符号”错误:
Compile ./app/controllers/blahblah_view_controller.rb
# compiling here, everything is awesome, until...
Create ./build/iPhoneOS-6.1-Development/App.app
Link ./build/iPhoneOS-6.1-Development/App.app/APP
duplicate symbol _GAD_MD5 in:
/Users/edd/Projects/ProjectName/vendor/GoogleAdMobAdsSDK/libGoogleAdMobAds.a(md5.o)
/Users/edd/Projects/ProjectName/vendor/GoogleAdMobAdsSDK/libGoogleAdMobAds.a(gad_md5.o)
ld: 1 duplicate symbol for architecture armv7s
clang: error: linker command failed with exit code 1 (use -v to see invocation)
rake aborted!
Command failed with status (1): [/Applications/Xcode.app/Contents/Developer...]
/Library/RubyMotion/lib/motion/project/builder.rb:393:in `build'
/Library/RubyMotion/lib/motion/project/app.rb:72:in `build'
/Library/RubyMotion/lib/motion/project.rb:56:in `block (2 levels) in <top (required)>'
Tasks: TOP => build:device
(See full trace by running task with --trace)
值得注意的是,这只发生在为 device 构建时。它在模拟器中运行良好。相关Rakefile
线路:
app.vendor_project('vendor/GoogleAdMobAdsSDK', :static)
通过 CocoaPods 包含 SDK 时也会出现此问题。
有什么建议么?