我构建了一个离子应用程序并从中构建了IOS应用程序。当我尝试构建IOS应用程序时,我在此应用程序中使用了firebase推送通知。如何摆脱这里提到的重复文件
重复符号_GTMNSDataZlibRemainingBytesKey in: /Users/uvinduchandrasiri/Library/Developer/Xcode/DerivedData/Sale_Ching-fmystclqwodflqflbkuaoyjyhfbc/Build/Products/Debug-iphonesimulator/GoogleToolboxForMac/libGoogleToolboxForMac.a(GTMNSData+zlib.o) Sale Ching / Plugins / cordova-plugin-firebase / GoogleToolboxForMac.framework / GoogleToolboxForMac(GTMNSData + zlib_b66d12cf522b1bac6527d4b701a2e6f4.o) 重复符号_GTMNSDataZlibErrorKey in:
/Users/uvinduchandrasiri/Library/Developer/Xcode/DerivedData/Sale_Ching-fmystclqwodflqflbkuaoyjyhfbc/Build/Products/Debug-iphonesimulator/GoogleToolboxForMac/libGoogleToolboxForMac.a(GTMNSData+zlib.o)
Sale Ching/Plugins/cordova-plugin-firebase/GoogleToolboxForMac.framework/GoogleToolboxForMac(GTMNSData+zlib_b66d12cf522b1bac6527d4b701a2e6f4.o)
duplicate symbol _GTMNSDataZlibErrorDomain in:
/Users/uvinduchandrasiri/Library/Developer/Xcode/DerivedData/Sale_Ching-fmystclqwodflqflbkuaoyjyhfbc/Build/Products/Debug-iphonesimulator/GoogleToolboxForMac/libGoogleToolboxForMac.a(GTMNSData+zlib.o)
Sale Ching/Plugins/cordova-plugin-firebase/GoogleToolboxForMac.framework/GoogleToolboxForMac(GTMNSData+zlib_b66d12cf522b1bac6527d4b701a2e6f4.o)
duplicate symbol _OBJC_CLASS_$_GTMLogStandardFormatter in:
/Users/uvinduchandrasiri/Library/Developer/Xcode/DerivedData/Sale_Ching-fmystclqwodflqflbkuaoyjyhfbc/Build/Products/Debug-iphonesimulator/GoogleToolboxForMac/libGoogleToolboxForMac.a(GTMLogger.o)
Sale Ching/Plugins/cordova-plugin-firebase/GoogleToolboxForMac.framework/GoogleToolboxForMac(GTMLogger_1d87861920ce748f18c427633f13fd22.o)
duplicate symbol _OBJC_METACLASS_$_GTMLogStandardFormatter in:
/Users/uvinduchandrasiri/Library/Developer/Xcode/DerivedData/Sale_Ching-fmystclqwodflqflbkuaoyjyhfbc/Build/Products/Debug-iphonesimulator/GoogleToolboxForMac/libGoogleToolboxForMac.a(GTMLogger.o)
Sale Ching/Plugins/cordova-plugin-firebase/GoogleToolboxForMac.framework/GoogleToolboxForMac(GTMLogger_1d87861920ce748f18c427633f13fd22.o)
duplicate symbol _OBJC_CLASS_$_GTMLogBasicFormatter in:
/Users/uvinduchandrasiri/Library/Developer/Xcode/DerivedData/Sale_Ching-fmystclqwodflqflbkuaoyjyhfbc/Build/Products/Debug-iphonesimulator/GoogleToolboxForMac/libGoogleToolboxForMac.a(GTMLogger.o)
Sale Ching/Plugins/cordova-plugin-firebase/GoogleToolboxForMac.framework/GoogleToolboxForMac(GTMLogger_1d87861920ce748f18c427633f13fd22.o)
duplicate symbol _OBJC_METACLASS_$_GTMLogBasicFormatter in:
/Users/uvinduchandrasiri/Library/Developer/Xcode/DerivedData/Sale_Ching-fmystclqwodflqflbkuaoyjyhfbc/Build/Products/Debug-iphonesimulator/GoogleToolboxForMac/libGoogleToolboxForMac.a(GTMLogger.o)
Sale Ching/Plugins/cordova-plugin-firebase/GoogleToolboxForMac.framework/GoogleToolboxForMac(GTMLogger_1d87861920ce748f18c427633f13fd22.o)
duplicate symbol _OBJC_CLASS_$_GTMLogNoFilter in:
/Users/uvinduchandrasiri/Library/Developer/Xcode/DerivedData/Sale_Ching-fmystclqwodflqflbkuaoyjyhfbc/Build/Products/Debug-iphonesimulator/GoogleToolboxForMac/libGoogleToolboxForMac.a(GTMLogger.o)
Sale Ching/Plugins/cordova-plugin-firebase/GoogleToolboxForMac.framework/GoogleToolboxForMac(GTMLogger_1d87861920ce748f18c427633f13fd22.o)
duplicate symbol _OBJC_METACLASS_$_GTMLogNoFilter in:
/Users/uvinduchandrasiri/Library/Developer/Xcode/DerivedData/Sale_Ching-fmystclqwodflqflbkuaoyjyhfbc/Build/Products/Debug-iphonesimulator/GoogleToolboxForMac/libGoogleToolboxForMac.a(GTMLogger.o)
Sale Ching/Plugins/cordova-plugin-firebase/GoogleToolboxForMac.framework/GoogleToolboxForMac(GTMLogger_1d87861920ce748f18c427633f13fd22.o)
duplicate symbol _OBJC_CLASS_$_GTMLogMininumLevelFilter in:
/Users/uvinduchandrasiri/Library/Developer/Xcode/DerivedData/Sale_Ching-fmystclqwodflqflbkuaoyjyhfbc/Build/Products/Debug-iphonesimulator/GoogleToolboxForMac/libGoogleToolboxForMac.a(GTMLogger.o)
Sale Ching/Plugins/cordova-plugin-firebase/GoogleToolboxForMac.framework/GoogleToolboxForMac(GTMLogger_1d87861920ce748f18c427633f13fd22.o)
duplicate symbol _OBJC_METACLASS_$_GTMLogMininumLevelFilter in:
/Users/uvinduchandrasiri/Library/Developer/Xcode/DerivedData/Sale_Ching-fmystclqwodflqflbkuaoyjyhfbc/Build/Products/Debug-iphonesimulator/GoogleToolboxForMac/libGoogleToolboxForMac.a(GTMLogger.o)
Sale Ching/Plugins/cordova-plugin-firebase/GoogleToolboxForMac.framework/GoogleToolboxForMac(GTMLogger_1d87861920ce748f18c427633f13fd22.o)
duplicate symbol _OBJC_CLASS_$_GTMLogMaximumLevelFilter in:
/Users/uvinduchandrasiri/Library/Developer/Xcode/DerivedData/Sale_Ching-fmystclqwodflqflbkuaoyjyhfbc/Build/Products/Debug-iphonesimulator/GoogleToolboxForMac/libGoogleToolboxForMac.a(GTMLogger.o)
Sale Ching/Plugins/cordova-plugin-firebase/GoogleToolboxForMac.framework/GoogleToolboxForMac(GTMLogger_1d87861920ce748f18c427633f13fd22.o)
duplicate symbol _OBJC_METACLASS_$_GTMLogMaximumLevelFilter in:
/Users/uvinduchandrasiri/Library/Developer/Xcode/DerivedData/Sale_Ching-fmystclqwodflqflbkuaoyjyhfbc/Build/Products/Debug-iphonesimulator/GoogleToolboxForMac/libGoogleToolboxForMac.a(GTMLogger.o)
Sale Ching/Plugins/cordova-plugin-firebase/GoogleToolboxForMac.framework/GoogleToolboxForMac(GTMLogger_1d87861920ce748f18c427633f13fd22.o)
duplicate symbol _OBJC_CLASS_$_GTMLogLevelFilter in:
/Users/uvinduchandrasiri/Library/Developer/Xcode/DerivedData/Sale_Ching-fmystclqwodflqflbkuaoyjyhfbc/Build/Products/Debug-iphonesimulator/GoogleToolboxForMac/libGoogleToolboxForMac.a(GTMLogger.o)
Sale Ching/Plugins/cordova-plugin-firebase/GoogleToolboxForMac.framework/GoogleToolboxForMac(GTMLogger_1d87861920ce748f18c427633f13fd22.o)
duplicate symbol _OBJC_METACLASS_$_GTMLogLevelFilter in:
/Users/uvinduchandrasiri/Library/Developer/Xcode/DerivedData/Sale_Ching-fmystclqwodflqflbkuaoyjyhfbc/Build/Products/Debug-iphonesimulator/GoogleToolboxForMac/libGoogleToolboxForMac.a(GTMLogger.o)
Sale Ching/Plugins/cordova-plugin-firebase/GoogleToolboxForMac.framework/GoogleToolboxForMac(GTMLogger_1d87861920ce748f18c427633f13fd22.o)
duplicate symbol _OBJC_CLASS_$_GTMLogAllowedLevelFilter in:
/Users/uvinduchandrasiri/Library/Developer/Xcode/DerivedData/Sale_Ching-fmystclqwodflqflbkuaoyjyhfbc/Build/Products/Debug-iphonesimulator/GoogleToolboxForMac/libGoogleToolboxForMac.a(GTMLogger.o)
Sale Ching/Plugins/cordova-plugin-firebase/GoogleToolboxForMac.framework/GoogleToolboxForMac(GTMLogger_1d87861920ce748f18c427633f13fd22.o)
duplicate symbol _OBJC_METACLASS_$_GTMLogAllowedLevelFilter in:
/Users/uvinduchandrasiri/Library/Developer/Xcode/DerivedData/Sale_Ching-fmystclqwodflqflbkuaoyjyhfbc/Build/Products/Debug-iphonesimulator/GoogleToolboxForMac/libGoogleToolboxForMac.a(GTMLogger.o)
Sale Ching/Plugins/cordova-plugin-firebase/GoogleToolboxForMac.framework/GoogleToolboxForMac(GTMLogger_1d87861920ce748f18c427633f13fd22.o)
duplicate symbol _OBJC_CLASS_$_GTMLogger in:
/Users/uvinduchandrasiri/Library/Developer/Xcode/DerivedData/Sale_Ching-fmystclqwodflqflbkuaoyjyhfbc/Build/Products/Debug-iphonesimulator/GoogleToolboxForMac/libGoogleToolboxForMac.a(GTMLogger.o)
Sale Ching/Plugins/cordova-plugin-firebase/GoogleToolboxForMac.framework/GoogleToolboxForMac(GTMLogger_1d87861920ce748f18c427633f13fd22.o)
duplicate symbol _OBJC_METACLASS_$_GTMLogger in:
/Users/uvinduchandrasiri/Library/Developer/Xcode/DerivedData/Sale_Ching-fmystclqwodflqflbkuaoyjyhfbc/Build/Products/Debug-iphonesimulator/GoogleToolboxForMac/libGoogleToolboxForMac.a(GTMLogger.o)
Sale Ching/Plugins/cordova-plugin-firebase/GoogleToolboxForMac.framework/GoogleToolboxForMac(GTMLogger_1d87861920ce748f18c427633f13fd22.o)
duplicate symbol _OBJC_IVAR_$_GTMLogLevelFilter.userDefaults_ in:
/Users/uvinduchandrasiri/Library/Developer/Xcode/DerivedData/Sale_Ching-fmystclqwodflqflbkuaoyjyhfbc/Build/Products/Debug-iphonesimulator/GoogleToolboxForMac/libGoogleToolboxForMac.a(GTMLogger.o)
Sale Ching/Plugins/cordova-plugin-firebase/GoogleToolboxForMac.framework/GoogleToolboxForMac(GTMLogger_1d87861920ce748f18c427633f13fd22.o)
duplicate symbol _OBJC_IVAR_$_GTMLogAllowedLevelFilter.allowedLevels_ in:
/Users/uvinduchandrasiri/Library/Developer/Xcode/DerivedData/Sale_Ching-fmystclqwodflqflbkuaoyjyhfbc/Build/Products/Debug-iphonesimulator/GoogleToolboxForMac/libGoogleToolboxForMac.a(GTMLogger.o)
Sale Ching/Plugins/cordova-plugin-firebase/GoogleToolboxForMac.framework/GoogleToolboxForMac(GTMLogger_1d87861920ce748f18c427633f13fd22.o)
duplicate symbol _OBJC_IVAR_$_GTMLogger.formatter_ in:
/Users/uvinduchandrasiri/Library/Developer/Xcode/DerivedData/Sale_Ching-fmystclqwodflqflbkuaoyjyhfbc/Build/Products/Debug-iphonesimulator/GoogleToolboxForMac/libGoogleToolboxForMac.a(GTMLogger.o)
Sale Ching/Plugins/cordova-plugin-firebase/GoogleToolboxForMac.framework/GoogleToolboxForMac(GTMLogger_1d87861920ce748f18c427633f13fd22.o)
duplicate symbol _OBJC_IVAR_$_GTMLogStandardFormatter.dateFormatter_ in:
/Users/uvinduchandrasiri/Library/Developer/Xcode/DerivedData/Sale_Ching-fmystclqwodflqflbkuaoyjyhfbc/Build/Products/Debug-iphonesimulator/GoogleToolboxForMac/libGoogleToolboxForMac.a(GTMLogger.o)
Sale Ching/Plugins/cordova-plugin-firebase/GoogleToolboxForMac.framework/GoogleToolboxForMac(GTMLogger_1d87861920ce748f18c427633f13fd22.o)
duplicate symbol _OBJC_IVAR_$_GTMLogger.filter_ in:
/Users/uvinduchandrasiri/Library/Developer/Xcode/DerivedData/Sale_Ching-fmystclqwodflqflbkuaoyjyhfbc/Build/Products/Debug-iphonesimulator/GoogleToolboxForMac/libGoogleToolboxForMac.a(GTMLogger.o)
Sale Ching/Plugins/cordova-plugin-firebase/GoogleToolboxForMac.framework/GoogleToolboxForMac(GTMLogger_1d87861920ce748f18c427633f13fd22.o)
duplicate symbol _OBJC_IVAR_$_GTMLogger.writer_ in:
/Users/uvinduchandrasiri/Library/Developer/Xcode/DerivedData/Sale_Ching-fmystclqwodflqflbkuaoyjyhfbc/Build/Products/Debug-iphonesimulator/GoogleToolboxForMac/libGoogleToolboxForMac.a(GTMLogger.o)
Sale Ching/Plugins/cordova-plugin-firebase/GoogleToolboxForMac.framework/GoogleToolboxForMac(GTMLogger_1d87861920ce748f18c427633f13fd22.o)
duplicate symbol _OBJC_IVAR_$_GTMLogStandardFormatter.pname_ in:
/Users/uvinduchandrasiri/Library/Developer/Xcode/DerivedData/Sale_Ching-fmystclqwodflqflbkuaoyjyhfbc/Build/Products/Debug-iphonesimulator/GoogleToolboxForMac/libGoogleToolboxForMac.a(GTMLogger.o)
Sale Ching/Plugins/cordova-plugin-firebase/GoogleToolboxForMac.framework/GoogleToolboxForMac(GTMLogger_1d87861920ce748f18c427633f13fd22.o)
duplicate symbol _OBJC_IVAR_$_GTMLogStandardFormatter.pid_ in:
/Users/uvinduchandrasiri/Library/Developer/Xcode/DerivedData/Sale_Ching-fmystclqwodflqflbkuaoyjyhfbc/Build/Products/Debug-iphonesimulator/GoogleToolboxForMac/libGoogleToolboxForMac.a(GTMLogger.o)
Sale Ching/Plugins/cordova-plugin-firebase/GoogleToolboxForMac.framework/GoogleToolboxForMac(GTMLogger_1d87861920ce748f18c427633f13fd22.o)
duplicate symbol _OBJC_IVAR_$_GTMLogLevelFilter.verboseLoggingEnabled_ in:
/Users/uvinduchandrasiri/Library/Developer/Xcode/DerivedData/Sale_Ching-fmystclqwodflqflbkuaoyjyhfbc/Build/Products/Debug-iphonesimulator/GoogleToolboxForMac/libGoogleToolboxForMac.a(GTMLogger.o)
Sale Ching/Plugins/cordova-plugin-firebase/GoogleToolboxForMac.framework/GoogleToolboxForMac(GTMLogger_1d87861920ce748f18c427633f13fd22.o)
duplicate symbol _OBJC_IVAR_$_GPBFloatArray._capacity in:
/Users/uvinduchandrasiri/Library/Developer/Xcode/DerivedData/Sale_Ching-fmystclqwodflqflbkuaoyjyhfbc/Build/Products/Debug-iphonesimulator/Protobuf/libProtobuf.a(GPBArray.o)
Sale Ching/Plugins/cordova-plugin-firebase/Protobuf.framework/Protobuf(GPBArray_9c18dd0099bac64399d692ec28726322.o)
duplicate symbol _OBJC_IVAR_$_GPBEnumArray._capacity in:
/Users/uvinduchandrasiri/Library/Developer/Xcode/DerivedData/Sale_Ching-fmystclqwodflqflbkuaoyjyhfbc/Build/Products/Debug-iphonesimulator/Protobuf/libProtobuf.a(GPBArray.o)
duplicate symbols for architecture x86_64
答案 0 :(得分:2)
架构x86_64的重复符号
这意味着您已经加载了两次相同的功能。由于从其他链接器标志中删除-ObjC后问题消失,这意味着该选项导致函数加载两次:
来自Technical Q& A
此标志使链接器加载库中的每个目标文件 定义Objective-C类或类别。虽然这个选项会 通常会导致更大的可执行文件(由于额外的目标代码 加载到应用程序中),它将允许成功创建 包含类别的有效Objective-C静态库 现有的课程。
https://developer.apple.com/library/content/qa/qa1490/_index.html
请按照此link了解更多详情
答案 1 :(得分:0)
我也遇到了同样的问题。某些框架在我们的项目中添加了两次。所以我通过从项目设置中删除重复的框架来修复它 - >构建阶段 - >链接Binary与库然后检查一些框架可能会被添加多次,只需找到重复的框架并删除它们,然后它应该工作正常。
答案 2 :(得分:0)
通常在多个库(目标文件)共享相同的变量/函数名称并生成重复的符号时发生。编译器对于应该调用哪一个感到困惑。
要解决此问题,我们可以使函数内联或使用宏代替函数名称。我们还可以仅通过使用 static 将函数作用域设置为库本地。