duplicate symbols for architecture armv7

前端 未结 16 1735
遥遥无期
遥遥无期 2020-12-01 01:46

Getting following error when try to use Layar SDK in my existing app. How can I solve this?

Ld /Users/pnawale/Library/Developer/Xcode/DerivedData/hub-afxxzaq         


        
16条回答
  •  不知归路
    2020-12-01 02:20

    Be careful if you're using Cordova iOS 4.5.0, an error of this kind may happen

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

    It can be due to the use of cordova-plugin-console, which is not useful anymore in Cordova iOS 4.5.0 (and breaks the build too!).

    To fix it

    cordova plugin remove cordova-plugin-console
    

    See reference : https://cordova.apache.org/announcements/2017/09/08/ios-release.html

提交回复
热议问题