MobiVM / robovm

Ahead of time compiler for JVM bytecode targetting iOS, Mac OSX and Linux
https://mobivm.github.io
950 stars 131 forks source link

Appodeal and YandexMetrica duplicate symbol #122

Closed ghost closed 7 years ago

ghost commented 7 years ago

Issue details

I trying to integrate Appodeal in app which already uses YandexAppMetrica. As I understand, Appodeal already incluide YandexAppMetrica.

If I setup robovm.xml like this:

<framework>Appodeal</framework>
<framework>YandexMobileMetrica</framework>

image

Here is what I got in output: (compile time error)

duplicate symbol _OBJC_IVAR_$_PodYandexMobileMetrica_FMStatement._query in:
    /Users/alexandrlevin/IdeaProjects/krq/krq-player-ios/libs/YandexMobileMetrica.framework/YandexMobileMetrica(FMDatabase.o)
    /Users/alexandrlevin/IdeaProjects/krq/krq-player-ios/libs/Appodeal.framework/Appodeal(FMDatabase.o)

I also tried to remove YandexMobileMetrica.framework and exclude <framework>YandexMobileMetrica</framework> from robovm.xml but then I got such error:

ld: framework not found YandexMobileMetrica
clang: error: linker command failed with exit code 1 (use -v to see invocation)

How can I fix that?

Build Tools:

Versions:

Please provide the version of RoboVM, XCode and JDK used

Build Targets:

iPhone 5s physical device

ghost commented 7 years ago

Fixed. this binding: https://github.com/MobiDevelop/robovm-robopods/tree/master/appmetrica contains robovm.xml which include <framework>YandexMobileMetrica</framework> I just downloaded binding's sources and added it manually without it's robovm.xml. Now I can successfully use YandexMobileMetrica included in Appodeal without this error: ld: framework not found YandexMobileMetrica