xcode - 在iPhone上运行Ionic 3应用会引发错误:体系结构arm64的2个重复符号

标签 xcode cordova ionic-framework cordova-plugins ionic3

我正在打开Ionic 3项目的.xcworkspace并尝试在设备上运行它,但是突然在Xcode中出现以下错误:

Ld /Users/manuel/Library/Developer/Xcode/DerivedData/MyApp-awaxbzztsgokklgptpuoufwcwmkt/Build/Products/Debug-iphoneos/MyApp.app/MyApp normal arm64
    cd /Users/manuel/Documents/MyApp/dev/copernic4-ion2/galilei/platforms/ios
    export IPHONEOS_DEPLOYMENT_TARGET=9.0
    export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch arm64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk -L/Users/manuel/Library/Developer/Xcode/DerivedData/MyApp-awaxbzztsgokklgptpuoufwcwmkt/Build/Products/Debug-iphoneos -L/Users/manuel/Documents/MyApp/dev/copernic4-ion2/galilei/platforms/ios/MyApp/Plugins/cordova-plugin-google-analytics -F/Users/manuel/Library/Developer/Xcode/DerivedData/MyApp-awaxbzztsgokklgptpuoufwcwmkt/Build/Products/Debug-iphoneos -F/Users/manuel/Documents/MyApp/dev/copernic4-ion2/galilei/platforms/ios/Pods/OneSignal/iOS_SDK/OneSignalSDK/Framework -FMyApp/Plugins/com.googlemaps.ios -filelist /Users/manuel/Library/Developer/Xcode/DerivedData/MyApp-awaxbzztsgokklgptpuoufwcwmkt/Build/Intermediates/MyApp.build/Debug-iphoneos/MyApp.build/Objects-normal/arm64/MyApp.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -miphoneos-version-min=9.0 -dead_strip -Xlinker -object_path_lto -Xlinker /Users/manuel/Library/Developer/Xcode/DerivedData/MyApp-awaxbzztsgokklgptpuoufwcwmkt/Build/Intermediates/MyApp.build/Debug-iphoneos/MyApp.build/Objects-normal/arm64/MyApp_lto.o -Xlinker -no_deduplicate -fobjc-arc -fobjc-link-runtime -ObjC -ObjC -framework OneSignal -framework SystemConfiguration -framework UIKit -framework UserNotifications /Users/manuel/Library/Developer/Xcode/DerivedData/MyApp-awaxbzztsgokklgptpuoufwcwmkt/Build/Products/Debug-iphoneos/libCordova.a -framework Accelerate -framework CoreData -framework CoreLocation -framework CoreText -framework GLKit -framework ImageIO -lc++ -lz -framework OpenGLES -framework QuartzCore -framework SystemConfiguration -framework UIKit -framework GoogleMapsBase -framework GoogleMaps -framework GoogleMapsCore -framework EventKit -framework EventKitUI -framework AVFoundation -lGoogleAnalyticsServices -lAdIdAccess -framework AdSupport -lsqlite3 -weak_framework WebKit -lz -Xlinker -dependency_info -Xlinker /Users/manuel/Library/Developer/Xcode/DerivedData/MyApp-awaxbzztsgokklgptpuoufwcwmkt/Build/Intermediates/MyApp.build/Debug-iphoneos/MyApp.build/Objects-normal/arm64/MyApp_dependency_info.dat -o /Users/manuel/Library/Developer/Xcode/DerivedData/MyApp-awaxbzztsgokklgptpuoufwcwmkt/Build/Products/Debug-iphoneos/MyApp.app/MyApp

duplicate symbol _OBJC_CLASS_$_CDVLogger in:
    /Users/manuel/Library/Developer/Xcode/DerivedData/MyApp-awaxbzztsgokklgptpuoufwcwmkt/Build/Intermediates/MyApp.build/Debug-iphoneos/MyApp.build/Objects-normal/arm64/CDVLogger.o
    /Users/manuel/Library/Developer/Xcode/DerivedData/MyApp-awaxbzztsgokklgptpuoufwcwmkt/Build/Products/Debug-iphoneos/libCordova.a(CDVLogger.o)
duplicate symbol _OBJC_METACLASS_$_CDVLogger in:
    /Users/manuel/Library/Developer/Xcode/DerivedData/MyApp-awaxbzztsgokklgptpuoufwcwmkt/Build/Intermediates/MyApp.build/Debug-iphoneos/MyApp.build/Objects-normal/arm64/CDVLogger.o
    /Users/manuel/Library/Developer/Xcode/DerivedData/MyApp-awaxbzztsgokklgptpuoufwcwmkt/Build/Products/Debug-iphoneos/libCordova.a(CDVLogger.o)
ld: 2 duplicate symbols for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

我不知道重复的内容是什么。任何帮助将不胜感激。

最佳答案

要解决该问题,请查看Cordova iOS 4.5中的此博客文章。
http://cordova.apache.org/announcements/2017/09/08/ios-release.html

您需要删除在生成新的Ionic项目时默认安装的插件“cordova-plugin-console”。现在,这是用于iOS的cordova的核心部分。

关于xcode - 在iPhone上运行Ionic 3应用会引发错误:体系结构arm64的2个重复符号,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46173762/

相关文章:

css - ionic 2 上的大小按钮与 col

ios - Xcode 11.1 错误 : Multiple commands produce

iOS PhoneGap 应用提交

ios - Xcode图像操作内存泄漏

cordova - WkWebView 视口(viewport)适合 "cover"在 iOS 12 中损坏

eclipse - 运行 cordova build android phonegap 时出现错误

angular - ionic 3 : One header component for several pages

javascript - Web Workers 会对 ionic 应用程序有益吗?

objective-c - 使用 GameKit 以字节形式发送和接收 NSMutableArray

Xcode 错误 : failed to launch [directory] -- invalid host string: 'localhost'