Google Play Services error on Amazon builds, but only when including LESS plugins

Corona version: 2017.3184 (2017.12.8)

Hi folks.  We’ve got a strange issue that we are scratching our heads at.  

When we release our games we release a LITE and FULL version of each.  The LITE version uses lots of IAP and Ads plugins, while our FULL version is upfront paid and doesn’t include any IAP or Ads plugins.

The problem : our FULL games are all failing on Amazon.  See attached picture “AmazonFULL.png”.  This is the "Corona: Developer Error <game> does not target the Google Play store, but includes Google Play Services. This is adding unneccessary bloat to your app as Google Play Services depends on the Google Play store. Please remove Google Play Services from builds that do not target Google Play.

The strange part: our LITE games, with many more plugins but otherwise is the exact same game and source code, works fine!  See attached picture “AmazonLITE.png”.  The only thing different between them is the build.settings.  

In both cases we are targeting the Amazon Store when building. Both use the same source code. The working LITE versions use the same plugins as the FULL version, just with more of them.  Example: they both use Firebase analytics, ZIP, social, etc.

Here’s the build.settings for the working LITE game:

settings = { splashScreen = { enable = false }, orientation = { default = "landscapeRight", supported = { "landscapeLeft", "landscapeRight", }, }, excludeFiles = { all = { "\*.ogg" , "Launch.png" , "Launch@2x.png" , "Launch@3x.png" , "FireRabbitLaunchScreen.storyboardc" , "Images.xcassets" , "Icon-40.png" , "Icon-58.png" , "Icon-76.png" , "Icon-80.png" , "Icon-87.png" , "Icon-120.png" , "Icon-152.png" , "Icon-167.png" , "Icon-180.png" , "Icon-1024.png" , "carnageflexibles/horseHUD\*" , "carnageflexibles/swinventory\*" } }, plugins = { ["CoronaProvider.native.popup.social"] = { publisherId = "com.coronalabs", }, ["plugin.zip"] = { publisherId = "com.coronalabs" }, ["plugin.CoronaSplashControl"] = { publisherId = "com.coronalabs" }, ["plugin.chartboost"] = { publisherId = "com.coronalabs" }, ["plugin.unityads"] = { publisherId = "com.coronalabs" }, ["plugin.adcolony"] = { publisherId = "com.coronalabs" }, ["plugin.inMobi"] = { publisherId = "com.coronalabs" }, ["plugin.applovin.paid"] = { publisherId = "com.coronalabs" }, ["plugin.admob"] = { publisherId = "com.coronalabs" }, ["plugin.vungle"] = { publisherId = "com.vungle", }, ["plugin.adbuddiz"] = { publisherId = "com.adbuddiz", }, ["plugin.fbAudienceNetwork.paid"] = { publisherId = "com.coronalabs", }, ["plugin.revmob"] = { publisherId = "com.coronalabs", }, ["plugin.iap\_badger"] = { publisherId = "uk.co.happymongoose", }, ["plugin.amazon.iap"] = { publisherId = "com.coronalabs", }, ["plugin.firebaseAnalytics"] = { publisherId = "tech.scotth", }, }, android = { useGoogleServicesJson = true, usesPermissions = { "android.permission.INTERNET", "android.permission.ACCESS\_NETWORK\_STATE", }, }, }

… and here’s the NOT working FULL build.settings:

settings = { splashScreen = { enable = false }, orientation = { default = "landscapeRight", supported = { "landscapeLeft", "landscapeRight", }, }, excludeFiles = { all = { "\*.ogg" , "Launch.png" , "Launch@2x.png" , "Launch@3x.png" , "FireRabbitLaunchScreen.storyboardc" , "Images.xcassets" , "Icon-40.png" , "Icon-58.png" , "Icon-76.png" , "Icon-80.png" , "Icon-87.png" , "Icon-120.png" , "Icon-152.png" , "Icon-167.png" , "Icon-180.png" , "Icon-1024.png" , "carnageflexibles/horseHUD\*" , "carnageflexibles/swinventory\*" } }, plugins = { ["CoronaProvider.native.popup.social"] = { publisherId = "com.coronalabs", }, ["plugin.zip"] = { publisherId = "com.coronalabs" }, ["plugin.CoronaSplashControl"] = { publisherId = "com.coronalabs" }, ["plugin.firebaseAnalytics"] = { publisherId = "tech.scotth", }, }, android = { useGoogleServicesJson = true, usesPermissions = { "android.permission.INTERNET", "android.permission.ACCESS\_NETWORK\_STATE", }, }, }

Please help us so we stop losing so much hair.  We can’t publish our portfolio FULL games to Amazon right now.

Cheers,

Chris

We still have a problem but at least now we can say it’s the  FireBase plugin by XXXX somehow. We know this because if we remove it from our code, change the build.settings as per what follows (removing both plugin reference and the useGoogleServicesJson = true), we can build without that bloat notice-

So how do we get this to work with FireBase? Why is it that when including the plugin in our LITE version we don’t get the bloat notice? How do we contact tech.scotth?

Our New build.settings

settings = { splashScreen = { enable = false }, orientation = { default = "landscapeRight", supported = { "landscapeLeft", "landscapeRight", }, }, excludeFiles = { all = { "\*.ogg" , "Launch.png" , "Launch@2x.png" , "Launch@3x.png" , "FireRabbitLaunchScreen.storyboardc" , "Images.xcassets" , "Icon-40.png" , "Icon-58.png" , "Icon-76.png" , "Icon-80.png" , "Icon-87.png" , "Icon-120.png" , "Icon-152.png" , "Icon-167.png" , "Icon-180.png" , "Icon-1024.png" , "carnageflexibles/horseHUD\*" , "carnageflexibles/swinventory\*" } }, plugins = { ["CoronaProvider.native.popup.social"] = { publisherId = "com.coronalabs", }, ["plugin.zip"] = { publisherId = "com.coronalabs" }, ["plugin.CoronaSplashControl"] = { publisherId = "com.coronalabs" }, -- REMOVED the "plugin.firebaseAnalytics" by tech.scotth }, android = { -- REMOVED the "useGoogleServicesJson" usesPermissions = { "android.permission.INTERNET", "android.permission.ACCESS\_NETWORK\_STATE", }, }, }

Firebase analytics or any firebase plugin is not supported by Amazons version of Android. The firebase sdk is wrapped in google play services which are not on amazons version of Android.

Thanks Scott! This seems obvious to us now :slight_smile:

Alex

If you want Google analytics on all platforms use their REST API

We still have a problem but at least now we can say it’s the  FireBase plugin by XXXX somehow. We know this because if we remove it from our code, change the build.settings as per what follows (removing both plugin reference and the useGoogleServicesJson = true), we can build without that bloat notice-

So how do we get this to work with FireBase? Why is it that when including the plugin in our LITE version we don’t get the bloat notice? How do we contact tech.scotth?

Our New build.settings

settings = { splashScreen = { enable = false }, orientation = { default = "landscapeRight", supported = { "landscapeLeft", "landscapeRight", }, }, excludeFiles = { all = { "\*.ogg" , "Launch.png" , "Launch@2x.png" , "Launch@3x.png" , "FireRabbitLaunchScreen.storyboardc" , "Images.xcassets" , "Icon-40.png" , "Icon-58.png" , "Icon-76.png" , "Icon-80.png" , "Icon-87.png" , "Icon-120.png" , "Icon-152.png" , "Icon-167.png" , "Icon-180.png" , "Icon-1024.png" , "carnageflexibles/horseHUD\*" , "carnageflexibles/swinventory\*" } }, plugins = { ["CoronaProvider.native.popup.social"] = { publisherId = "com.coronalabs", }, ["plugin.zip"] = { publisherId = "com.coronalabs" }, ["plugin.CoronaSplashControl"] = { publisherId = "com.coronalabs" }, -- REMOVED the "plugin.firebaseAnalytics" by tech.scotth }, android = { -- REMOVED the "useGoogleServicesJson" usesPermissions = { "android.permission.INTERNET", "android.permission.ACCESS\_NETWORK\_STATE", }, }, }

Firebase analytics or any firebase plugin is not supported by Amazons version of Android. The firebase sdk is wrapped in google play services which are not on amazons version of Android.

Thanks Scott! This seems obvious to us now :slight_smile:

Alex

If you want Google analytics on all platforms use their REST API