Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

duplicate symbol linker error when adding crashlytics and fabric

I am adding both Fabric and Crashlytics in pod file. When I update pods I get linker error with duplicate symbol. I'm finding here that it has got same files in both Fabric.framework and Crashlytics.framework but how can I resolve this issue from my end?

duplicate symbol _CLSMachOEnumerateSlicesAtAddress in:
    Location/Crashlytics.framework/Crashlytics(CLSMachO.o)
    Location/Pods/Fabric/iOS/Fabric.framework/Fabric(CLSMachO.o)
duplicate symbol _CLSMachOFileDestroy in:
    Location/Crashlytics.framework/Crashlytics(CLSMachO.o)
    Location/Pods/Fabric/iOS/Fabric.framework/Fabric(CLSMachO.o)
duplicate symbol _CLSMachOFileEnumerateSlices in:
    Location/Crashlytics.framework/Crashlytics(CLSMachO.o)
    Location/Pods/Fabric/iOS/Fabric.framework/Fabric(CLSMachO.o)
duplicate symbol _CLSMachOFileInitWithPath in:
    Location/Crashlytics.framework/Crashlytics(CLSMachO.o)
    Location/Pods/Fabric/iOS/Fabric.framework/Fabric(CLSMachO.o)
duplicate symbol _CLSMachOGetDylibPath in:
    Location/Crashlytics.framework/Crashlytics(CLSMachO.o)
    Location/Pods/Fabric/iOS/Fabric.framework/Fabric(CLSMachO.o)
duplicate symbol _CLSMachOGetEncrypted in:
    Location/Crashlytics.framework/Crashlytics(CLSMachO.o)
    Location/Pods/Fabric/iOS/Fabric.framework/Fabric(CLSMachO.o)
duplicate symbol _CLSMachOGetLinkedSDKVersion in:
    Location/Crashlytics.framework/Crashlytics(CLSMachO.o)
    Location/Pods/Fabric/iOS/Fabric.framework/Fabric(CLSMachO.o)
duplicate symbol _CLSMachOGetMinimumOSVersion in:
    Location/Crashlytics.framework/Crashlytics(CLSMachO.o)
    Location/Pods/Fabric/iOS/Fabric.framework/Fabric(CLSMachO.o)
duplicate symbol _CLSMachOGetUUID in:
    Location/Crashlytics.framework/Crashlytics(CLSMachO.o)
    Location/Pods/Fabric/iOS/Fabric.framework/Fabric(CLSMachO.o)
duplicate symbol _CLSMachONormalizeUUID in:
    Location/Crashlytics.framework/Crashlytics(CLSMachO.o)
    Location/Pods/Fabric/iOS/Fabric.framework/Fabric(CLSMachO.o)
duplicate symbol _CLSMachOSliceEnumerateLoadCommands in:
    Location/Crashlytics.framework/Crashlytics(CLSMachO.o)
    Location/Pods/Fabric/iOS/Fabric.framework/Fabric(CLSMachO.o)
duplicate symbol _CLSMachOSliceGetArchitectureName in:
    Location/Crashlytics.framework/Crashlytics(CLSMachO.o)
    Location/Pods/Fabric/iOS/Fabric.framework/Fabric(CLSMachO.o)
duplicate symbol _CLSMachOSliceGetCurrent in:
    Location/Crashlytics.framework/Crashlytics(CLSMachO.o)
    Location/Pods/Fabric/iOS/Fabric.framework/Fabric(CLSMachO.o)
duplicate symbol _CLSMachOSliceGetExecutablePath in:
    Location/Crashlytics.framework/Crashlytics(CLSMachO.o)
    Location/Pods/Fabric/iOS/Fabric.framework/Fabric(CLSMachO.o)
duplicate symbol _CLSMachOSliceGetUnwindInformation in:
    Location/Crashlytics.framework/Crashlytics(CLSMachO.o)
    Location/Pods/Fabric/iOS/Fabric.framework/Fabric(CLSMachO.o)
duplicate symbol _CLSMachOSliceIs64Bit in:
    Location/Crashlytics.framework/Crashlytics(CLSMachO.o)
    Location/Pods/Fabric/iOS/Fabric.framework/Fabric(CLSMachO.o)
duplicate symbol _CLSMachOSliceWithHeader in:
    Location/Crashlytics.framework/Crashlytics(CLSMachO.o)
    Location/Pods/Fabric/iOS/Fabric.framework/Fabric(CLSMachO.o)
ld: 17 duplicate symbols for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Thanks in advance.

like image 311
nOOb iOS Avatar asked Apr 01 '16 13:04

nOOb iOS


1 Answers

1.Remove (and move to trash) Fabric.framework and any installed Fabric kits and their associated resources.

  1. Do a Clean and a Deep Clean in the project (ALT-SHIFT-CMD-K)

  2. Add the Fabric pod to your Podfile: pod 'Fabric'

  3. Add a pod in your Podfile for each Fabric kit that your project is using: pod 'Crashlytics'

Note: If you need Crashlytics and Answers, you should only install pod 'Crashlytics' as Answers is included within Crashlytics. Only install pod 'Answers' if you want Answers without Crashlytics.

Hope that fixes your issue. In case all that fail try to delete all the pods and add them again in that order. Good Luck!

like image 60
George Bafaloukas Avatar answered Oct 22 '22 02:10

George Bafaloukas