Google Play services and google analytics don't work together?

Hi,

I was adding corona Ads to my app using the following code (taken from monetization dashboard). i have used it in another app too, where it works fine. But in my current app, the app crashes immediately (I’m creating a keystore apk). The only difference in the build.settings file in both apps is that I’ve added a google analytics plugin in my new app.

If i remove the google play services plugin, the app works fine. but as soon as i add it, the app crashes. Does that mean Google Analytics plugin and Google Play services plugin can’t be added together? Please help

plugins =

    {

        [“plugin.googleAnalytics”] =

        {

            publisherId = “com.coronalabs”,

            supportedPlatforms = { iphone=true, android=true }

        },

[“plugin.google.play.services”] =

        {

          publisherId = “com.coronalabs”,

          supportedPlatforms = { android=true }

        },

        [“shared.android.support.v4”] =

        {

          publisherId = “com.coronalabs”,

          supportedPlatforms = { android=true }

        },

        [“plugin.coronaAds”] =

        {

          publisherId = “com.coronalabs”,

          supportedPlatforms = { android=true, [“amazon-kindle”]=true, iphone=true }

        }, 

[“plugin.chartboost”] =

        {

          publisherId = “com.coronalabs”,

          supportedPlatforms = { android=true, [“amazon-kindle”]=true, iphone=true }

        },

        [“plugin.adcolony”] =

        {

          publisherId = “com.coronalabs”,

          supportedPlatforms = { android=true, [“amazon-kindle”]=true, iphone=true }

        },

    },

Correct. Google Analytics is not compatible with plugin.google.play.services. We are very aware of the problem and are working on a solution, but it’s very complex to solve. But we are nearing a solution.

Rob

Ok thanks for your response. So what do you suggest I get rid of? google analytics, or google play services? It’s my first game, so I’m not sure what to choose

also, i think this should be mentioned in documentation. I just spent the last 3 hours going through the code, documentation and looking for potential fixes.

Since you are including ads, you kind of at least for now keep plugin.google.play.services since there is a library call all the ad plugins need to call that’s why you have to include plugin.google.play.services. We have multiple different Analytics providers such as Flurry Analytics, GameAnalytics, Kochava Free App Analytics and possibly a few more. I would recommend looking at one of those for now.

Rob

Rob,

I’m now breaking here. Is this related to the new google build? Did not get this error before.

Thanks,

Carey

    /Users/user/Desktop/NewTweetword.app/.build/plugin.google.play.services/libgoogle-play-services.a(GADMRAIDResizeProperties.o)

ld: 214 duplicate symbols for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Is this still happening?

Rob, please help me out over here: https://forums.coronalabs.com/topic/66819-using-iap-badger-money-is-deducted-but-items-dont-get-transferred-to-inventory/

Rob Wrote:

>>Is this still happening?

Yes. Version 2016.2992 (2016.11.10)

@ali.ayyaz3, asking for help in an unrelated thread is a form of hijacking and is not helpful even if you are the thread’s original poster. If you’re not getting an answer on your question and at least 24 hours has elapsed you can bump your thread so it pops to the top of the list again.

@carey.green can you post your build.settings file please?

settings = {

plugins =

{      

[“plugin.google.iap.v3”] =

        {

            publisherId = “com.coronalabs”,

            supportedPlatforms = { android=true }

        },

[“plugin.notifications”] =

{

 publisherId = “com.coronalabs”

},

        – includes IAP Badger as a plug in

[“plugin.iap_badger”] =

        {

            – required

            publisherId = “uk.co.happymongoose”,

        },

          [“plugin.flurry.analytics”] =

        {

            publisherId = “com.coronalabs”,

            supportedPlatforms = { iphone=true, android=true }

        },

        

– below is for admob

      [“plugin.coronaAds”] =

        {

            publisherId = “com.coronalabs”,

            supportedPlatforms = { iphone=true, android=true }

        },

        [“plugin.google.play.services”] =

        {

            publisherId = “com.coronalabs”,

            supportedPlatforms = { iphone=true,android=true }

        },

        [“shared.android.support.v4”] =

        {

            publisherId = “com.coronalabs”,

            supportedPlatforms = { android=true }

        },

[“plugin.chartboost”] =

        {

          publisherId = “com.coronalabs”,

          supportedPlatforms = { iphone=true, android=true }

        },

[“plugin.gpgs”] =

{

            publisherId = “com.coronalabs”,

            supportedPlatforms = { android=true }

        }

,

       [“CoronaProvider.gameNetwork.apple”] =

        {

            publisherId = “com.coronalabs”,

            supportedPlatforms = { iphone=true, [“iphone-sim”]=true },

        },

       [“CoronaProvider.ads.vungle”] = 

        {

                        publisherId = “com.vungle”

        },

    [“plugin.chartboost”] =

{

    publisherId = “com.coronalabs”,

         supportedPlatforms = { iphone=true, android=true }

},

        [“plugin.notifications”] =

        {

            publisherId = “com.coronalabs”,

        },

[“plugin.facebook.v4”] =

        {

            publisherId = “com.coronalabs”

        },

  },

orientation = {

default = “portrait”,

supported = { “portrait”}

},

iphone = {

plist = {

MinimumOSVersion = “7.0”,

   UIApplicationExitsOnSuspend = false,

            FacebookAppID = “999”,  --replace XXXXXXXXXX with your Facebook App ID

            CFBundleURLTypes =

            {

                { CFBundleURLSchemes = { “999”, } }  --replace XXXXXXXXXX with your Facebook App ID

            },

NSAppTransportSecurity = { NSAllowsArbitraryLoads = true }, 

UIStatusBarHidden = true,

UIPrerenderedIcon = true, 

UIApplicationExitsOnSuspend = false, – uncomment to quit app on suspend

CFBundleShortVersionString = “1.2”,

UIAppFonts = 

{

“Nanami-ExtraLight.otf”,

“AvenirLTStd-Roman.otf”

},

            CFBundleIconFile = “Icon.png”,

            CFBundleDisplayName = “TweetWord”,

            CFBundleIconFiles = {

                “Icon.png”, 

                “Icon@2x.png”,

                “Icon-72.png”,

                “Icon-120.png”,

                “Icon-76.png”,

                “Icon-76@2x.png”,

            },            

}

},

– Android permissions

android =

{

versionCode = “1”,

        usesPermissions =

        {

            “android.permission.INTERNET”,

        },

{

        googlePlayGamesAppId = “999”,

},

},

}

Okay, then new GPGS plugin is not compatible with plugin.google.play.services, which is quite old. Engineering is working on a solution and they are getting close.

Rob

Rob, 

When I comment out the GPGS it still doesn’t work. Is there anything else?

Google Analytics is also not compatible with the old plug.google.play.services plugin.

Rob

I’m using Flurry, not Google. Could it be Vungle? Someone seemed to have an issue with that combo.

Sorry Carey. The subject of the post is:

Google Play services and google analytics don’t work together?

I don’t think we double load things, but your build.settings does load chartboost twice and notifications twice.  GPGS and Google Analytics are the only two that I know conflict with plugin.google.play.services.

Is there more in your console log from the build?

Rob

Sorry Rob, wasn’t trying to hijack the thread. Thought it related. That was the final error, it turns out there are 214 of these:

duplicate symbol _CFStringToCString in:

    /Users/user/Desktop/NewTweetword.app/.build/plugin.coronaAds/libplugin_coronaAds.a(GADGestureUtil.o)
    /Users/user/Desktop/NewTweetword.app/.build/plugin.google.play.services/libgoogle-play-services.a(GADGestureUtil.o)
duplicate symbol _GetWebSafeEncode in:
    /Users/user/Desktop/NewTweetword.app/.build/plugin.coronaAds/libplugin_coronaAds.a(GADGestureUtil.o)
    /Users/user/Desktop/NewTweetword.app/.build/plugin.google.play.services/libgoogle-play-services.a(GADGestureUtil.o)
duplicate symbol _IsReachable in:
    /Users/user/Desktop/NewTweetword.app/.build/plugin.coronaAds/libplugin_coronaAds.a(GADGestureUtil.o)
    /Users/user/Desktop/NewTweetword.app/.build/plugin.google.play.services/libgoogle-play-services.a(GADGestureUtil.o)
duplicate symbol _OBJC_CLASS_$_GADGestureUtil in:
    /Users/user/Desktop/NewTweetword.app/.build/plugin.coronaAds/libplugin_coronaAds.a(GADGestureUtil.o)
    /Users/user/Desktop/NewTweetword.app/.build/plugin.google.play.services/libgoogle-play-services.a(GADGestureUtil.o)
duplicate symbol _OBJC_METACLASS_$_GADGestureUtil in:
    /Users/user/Desktop/NewTweetword.app/.build/plugin.coronaAds/libplugin_coronaAds.a(GADGestureUtil.o)
    /Users/user/Desktop/NewTweetword.app/.build/plugin.google.play.services/libgoogle-play-services.a(GADGestureUtil.o)
duplicate symbol _GAD_MD5 in:
    /Users/user/Desktop/NewTweetword.app/.build/plugin.coronaAds/libplugin_coronaAds.a(gad_md5.o)
    /Users/user/Desktop/NewTweetword.app/.build/plugin.google.play.services/libgoogle-play-services.a(GADGestureCFiles.o)
duplicate symbol _InitNotifications in:
    /Users/user/Desktop/NewTweetword.app/.build/plugin.coronaAds/libplugin_coronaAds.a(GADGesture.o)
    /Users/user/Desktop/NewTweetword.app/.build/plugin.google.play.services/libgoogle-play-services.a(GADGestureCFiles.o)
duplicate symbol _IsInstanceMethodAvailable in:

Are you using Corona Ads? 

Yes i am using ads. Chartboost and admob.

I was asking specifically about “Corona Ads”. If you’re using Chartboost and AdMob then you don’t need to include 

 ["plugin.coronaAds"] = { publisherId = "com.coronalabs", supportedPlatforms = { iphone=true, android=true } },

Rob