Google Analytics Library IOS

前端 未结 11 1638
逝去的感伤
逝去的感伤 2021-02-12 17:39

When i add google analytics library, i have this warning

Undefined symbols for architecture armv7:
  \"_OBJC_CLASS_$_NSAttributeDescription\", referenced from:
          


        
11条回答
  •  清酒与你
    2021-02-12 18:25

    Problem related to Google Analytics SDK for iOS v2 migration.

    I am not sure which topic to write it to as there is no exact problem--I've bumped into and solved by my own--found (this one seems to be the closest (not sure if I should open a new one)), but might be helpfull for someone.

    Problem:

    I have my previous (1.5.1) SDK installed in "SDKs/GoogleAnalytics SDK" separate folder. On v2 migration I've placed the new files into "SDKs/GoogleAnalytics SDK v2". After following all the instructions about migration (from Google site) (and, in details, that was just removing the previous references to the files from the first folder and adding the new ones from the new one), I started to get the following error message on compilation:

    Undefined symbols for architecture armv7: "_OBJC_CLASS_$_GAI", referenced from: objc-class-ref in AppDelegate.o ld: symbol(s) not found for architecture armv7 clang: error: linker command failed with exit code 1 (use -v to see invocation)

    I went trough first pages of googling (and stackoverflowing) and the most popular solution suggested was "to set 'Build active architecture only' property to 'YES'" (my active architectures are "armv7 armv7s"). But that DID NOT HELP at all.

    Solution:

    However, a miracle happened. I've noticed that there is an old directory "SDKs/GoogleAnalytics SDK" was listed in linker pathes. So, after that directory removing (as I don't know where the list of the directories exists in settings) everything started to compile and work like a charm (also setting 'Build active architecture only' to 'YES' was not necessary for me).

提交回复
热议问题