在使用iOS 3.6.3和cordova 4.0.0的iOS上,Cordova Build失败

时间:2014-10-20 14:58:05

标签: ios cordova

我刚升级到cordova 4.0.0并将我的iOS平台升级到版本3.6.3

不幸的是,我的所有构建现在都失败了cordova build iOS上的以下输出:

 Ld build/emulator/App.app/App normal i386
     cd /Users/user/<app>/platforms/ios
     export IPHONEOS_DEPLOYMENT_TARGET=7.0
     export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/Users/user/.rvm/gems/ruby-2.0.0-p451/bin:/Users/user/.rvm/gems/ruby-2.0.0-p451@global/bin:/Users/user/.rvm/rubies/ruby-2.0.0-p451/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Users/user/.rvm/bin:/Users/user/.adt/tools:/Users/user/.adt/platform-tools"
     /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.0.sdk -L/Users/user/<app>/platforms/ios/build/emulator -L/Users/user/<app>/platforms/ios/App -L/Users/user/<app>/platforms/ios/App/Plugins/com.liyamahendra.cordova.plugins.flurry -F/Users/user/<app>/platforms/ios/build/emulator -F/Users/user/<app>/platforms/ios/HD -F/Users/user/<app>/platforms/ios/Safe -F/Users/user/<app>/platforms/ios/App/Plugins/com.phonegap.plugins.facebookconnect -filelist /Users/user/<app>/platforms/ios/build/App.build/Debug-iphonesimulator/App.build/Objects-normal/i386/App.LinkFileList -Xlinker -objc_abi_version -Xlinker 2 -weak_framework CoreFoundation -weak_framework UIKit -weak_framework AVFoundation -weak_framework CoreMedia -weak-lSystem -force_load /Users/user/<app>/platforms/ios/build/emulator/libCordova.a -ObjC -framework Lookback -fobjc-arc -fobjc-link-runtime -Xlinker -no_implicit_dylibs -mios-simulator-version-min=7.0 -framework FacebookSDK -framework AdSupport -lFlurryAds_5.3.0 -lz -framework QuartzCore -lFlurry_5.3.0 -framework CoreVideo -framework AudioToolbox -framework AVFoundation -framework CoreGraphics -framework CoreMedia -framework Lookback -framework AssetsLibrary /Users/user/<app>/platforms/ios/build/emulator/libCordova.a -framework Lookback -framework MobileCoreServices -framework CoreLocation -framework StoreKit -weak_framework iAd -Xlinker -dependency_info -Xlinker /Users/user/<app>/platforms/ios/build/App.build/Debug-iphonesimulator/App.build/Objects-normal/i386/App_dependency_info.dat -o /Users/user/<app>/platforms/ios/build/emulator/App.app/App
 duplicate symbol _OBJC_IVAR_$_CDVFilesystemURL._url in:
     /Users/user/<app>/platforms/ios/build/App.build/Debug-iphonesimulator/App.build/Objects-normal/i386/CDVFile-E7AB62C4A5CCC89.o
 duplicate symbol _OBJC_IVAR_$_CDVFilesystemURL._fileSystemName in:
     /Users/user/<app>/platforms/ios/build/App.build/Debug-iphonesimulator/App.build/Objects-normal/i386/CDVFile-E7AB62C4A5CCC89.o
 duplicate symbol _OBJC_IVAR_$_CDVFilesystemURL._fullPath in:
     /Users/user/<app>/platforms/ios/build/App.build/Debug-iphonesimulator/App.build/Objects-normal/i386/CDVFile-E7AB62C4A5CCC89.o
 duplicate symbol _kCDVFilesystemURLPrefix in:
     /Users/user/<app>/platforms/ios/build/App.build/Debug-iphonesimulator/App.build/Objects-normal/i386/CDVFile-E7AB62C4A5CCC89.o
 duplicate symbol _filePlugin in:
     /Users/user/<app>/platforms/ios/build/App.build/Debug-iphonesimulator/App.build/Objects-normal/i386/CDVFile-E7AB62C4A5CCC89.o
 duplicate symbol _OBJC_IVAR_$_CDVFile.fileSystems_ in:
     /Users/user/<app>/platforms/ios/build/App.build/Debug-iphonesimulator/App.build/Objects-normal/i386/CDVFile-E7AB62C4A5CCC89.o
 duplicate symbol _OBJC_IVAR_$_CDVFile.rootDocsPath in:
     /Users/user/<app>/platforms/ios/build/App.build/Debug-iphonesimulator/App.build/Objects-normal/i386/CDVFile-E7AB62C4A5CCC89.o
 duplicate symbol _OBJC_IVAR_$_CDVFile.appDocsPath in:
     /Users/user/<app>/platforms/ios/build/App.build/Debug-iphonesimulator/App.build/Objects-normal/i386/CDVFile-E7AB62C4A5CCC89.o
 duplicate symbol _OBJC_IVAR_$_CDVFile.appLibraryPath in:
     /Users/user/<app>/platforms/ios/build/App.build/Debug-iphonesimulator/App.build/Objects-normal/i386/CDVFile-E7AB62C4A5CCC89.o
 duplicate symbol _OBJC_IVAR_$_CDVFile.appTempPath in:
     /Users/user/<app>/platforms/ios/build/App.build/Debug-iphonesimulator/App.build/Objects-normal/i386/CDVFile-E7AB62C4A5CCC89.o
 duplicate symbol _OBJC_IVAR_$_CDVFile.userHasAllowed in:
     /Users/user/<app>/platforms/ios/build/App.build/Debug-iphonesimulator/App.build/Objects-normal/i386/CDVFile-E7AB62C4A5CCC89.o
 duplicate symbol _OBJC_IVAR_$_CDVFile._persistentPath in:
     /Users/user/<app>/platforms/ios/build/App.build/Debug-iphonesimulator/App.build/Objects-normal/i386/CDVFile-E7AB62C4A5CCC89.o
 duplicate symbol _OBJC_IVAR_$_CDVFile._temporaryPath in:
     /Users/user/<app>/platforms/ios/build/App.build/Debug-iphonesimulator/App.build/Objects-normal/i386/CDVFile-E7AB62C4A5CCC89.o
 duplicate symbol _OBJC_CLASS_$_CDVFilesystemURL in:
     /Users/user/<app>/platforms/ios/build/App.build/Debug-iphonesimulator/App.build/Objects-normal/i386/CDVFile-E7AB62C4A5CCC89.o
 duplicate symbol _OBJC_METACLASS_$_CDVFilesystemURL in:
     /Users/user/<app>/platforms/ios/build/App.build/Debug-iphonesimulator/App.build/Objects-normal/i386/CDVFile-E7AB62C4A5CCC89.o
 duplicate symbol _OBJC_METACLASS_$_CDVFilesystemURLProtocol in:
     /Users/user/<app>/platforms/ios/build/App.build/Debug-iphonesimulator/App.build/Objects-normal/i386/CDVFile-E7AB62C4A5CCC89.o
 duplicate symbol _OBJC_CLASS_$_CDVFilesystemURLProtocol in:
     /Users/user/<app>/platforms/ios/build/App.build/Debug-iphonesimulator/App.build/Objects-normal/i386/CDVFile-E7AB62C4A5CCC89.o
 duplicate symbol _OBJC_CLASS_$_CDVFile in:
     /Users/user/<app>/platforms/ios/build/App.build/Debug-iphonesimulator/App.build/Objects-normal/i386/CDVFile-E7AB62C4A5CCC89.o
 duplicate symbol _OBJC_METACLASS_$_CDVFile in:
     /Users/user/<app>/platforms/ios/build/App.build/Debug-iphonesimulator/App.build/Objects-normal/i386/CDVFile-E7AB62C4A5CCC89.o
 ld: 19 duplicate symbols for architecture i386
 clang: error: linker command failed with exit code 1 (use -v to see invocation)

 ** BUILD FAILED **


 The following build commands failed:
    Ld build/emulator/App.app/App normal i386
 (1 failure)
 Error: /Users/user/<app>/platforms/ios/cordova/build: Command failed with exit code 65
     at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:135:23)
     at ChildProcess.EventEmitter.emit (events.js:98:17)
     at maybeClose (child_process.js:743:16)
     at Process.ChildProcess._handle.onexit (child_process.js:810:5)

这可能来自哪些想法?

我正在运行Mac OS X 10.10(Yosemite)和Xcode 6。

希望你能提供帮助:)

1 个答案:

答案 0 :(得分:0)

好的,我发现了问题。实际上我在Build Phase标签的编译源列表中有两次来源。这导致了

ld: 19 duplicate symbols for architecture i386

导致构建失败的错误。