编译ionic项目的时候提示以下错误:

duplicate symbol _OBJCCLASS$_CDVLogger in: /Users/almaju/Library/Developer/Xcode/DerivedData/Shotgun-gfxenslogefzngcppvotdeekcsof/Build/Intermediates.noindex/Shotgun.build/Debug-iphonesimulator/Shotgun.build/Objects-normal/x86_64/CDVLogger.o /Users/almaju/Library/Developer/Xcode/DerivedData/Shotgun-gfxenslogefzngcppvotdeekcsof/Build/Products/Debug-iphonesimulator/libCordova.a(CDVLogger.o) duplicate symbol _OBJCMETACLASS$_CDVLogger in: /Users/almaju/Library/Developer/Xcode/DerivedData/Shotgun-gfxenslogefzngcppvotdeekcsof/Build/Intermediates.noindex/Shotgun.build/Debug-iphonesimulator/Shotgun.build/Objects-normal/x86_64/CDVLogger.o /Users/almaju/Library/Developer/Xcode/DerivedData/Shotgun-gfxenslogefzngcppvotdeekcsof/Build/Products/Debug-iphonesimulator/libCordova.a(CDVLogger.o) ld: 2 duplicate symbols for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

错误原因:

cordova-plugin-console重复添加了

删除即可。

cordova plugin remove cordova-plugin-console