Missing Google Play Services Library

I got a problem when I am trying to setup OneSignal notification but I got “Missing Google Play Services Library” for Android user listed on the OneSignal Panel.

I am using Corona SDK Version 2016.3012 (2016.12.29). And the following is my build.settings. I tried to enable the OneSignal Log and I got the attached error when I open the app on my Android device (Android 6.0.1).

settings = { splashScreen = { enable = false }, orientation = { default = "portrait", supported = { "portrait" } }, plugins = { -- Disable corona splash screen -- https://docs.coronalabs.com/plugin/CoronaSplashControl/index.html ["plugin.CoronaSplashControl"] = { publisherId = "com.coronalabs" }, -- Notification Plugin -- https://docs.coronalabs.com/guide/events/appNotification/index.html ["plugin.notifications"] = { publisherId = "com.coronalabs" }, -- OneSignal Plugin for Notifcation -- https://documentation.onesignal.com/docs/corona-sdk-setup ["plugin.OneSignal"] = { publisherId = "com.onesignal", }, -- OneSignal Plugin for Notifcation -- https://documentation.onesignal.com/docs/corona-sdk-setup ["plugin.google.play.services"] = { publisherId = "com.coronalabs", supportedPlatforms = { android=true, ["android-kindle"]=true }, }, }, android = { -- For Notification -- http://docs.coronalabs.com/guide/events/appNotification/index.html permissions = { { name = ".permission.C2D\_MESSAGE", protectionLevel = "signature" }, }, usesPermissions = { -- For WebView "android.permission.INTERNET", -- For Notification -- http://docs.coronalabs.com/guide/events/appNotification/index.html "android.permission.GET\_ACCOUNTS", -- Notification "android.permission.RECEIVE\_BOOT\_COMPLETED", -- Notification "com.google.android.c2dm.permission.RECEIVE", -- Notification ".permission.C2D\_MESSAGE", -- Notification -- For photo upload "android.permission.CAMERA", "android.permission.WRITE\_EXTERNAL\_STORAGE", "android.permission.READ\_EXTERNAL\_STORAGE", -- For Vibrate "android.permission.VIBRATE", }, CoronaWindowMovesWhenKeyboardAppears=true, -- Disable Android Tablet supportsScreens = { resizeable = false, smallScreens = true, normalScreens = true, largeScreens = false, xlargeScreens = false, largestWidthLimitDp = 320, }, }, iphone = { plist = { CFBundleIconFiles = { "Icon.png", "Icon@2x.png", "Icon-60.png", "Icon-60@2x.png", "Icon-60@3x.png", "Icon-72.png", "Icon-72@2x.png", "Icon-76.png", "Icon-76@2x.png", "Icon-167.png", "Icon-Small.png", "Icon-Small@2x.png", "Icon-Small@3x.png", "Icon-Small-40.png", "Icon-Small-40@2x.png", "Icon-Small-50.png", "Icon-Small-50@2x.png", }, -- Backgrounding Function -- See http://mobile.tutsplus.com/tutorials/corona/corona-sdk-handling-application-suspension/ UIApplicationExitsOnSuspend = false, -- iOS 9 Security Key -- https://coronalabs.com/blog/2015/09/17/about-app-transport-security-ats/ NSAppTransportSecurity = { NSExceptionDomains = { ["homemaidapp.com"] = { NSIncludesSubdomains = true, NSThirdPartyExceptionAllowsInsecureHTTPLoads = true }, } }, -- OneSignal Plugin UIBackgroundModes = {"remote-notification"}, }, },

I just tried to downgrade Corona SDK to 3004. The “Missing Google Play Services Library” gone BUT when I tried to send a test message from the OneSignal Web Panel to my Android device, I can see the notification has been sent on OneSignal Panel but I can’t get the notification on my Android.

The OneSignal plugin has been updated for Corona build 3005+ to fix the library missing issue. No changes are need, rebuilding your app will include the needed Google Play services library files now.

If you continue to see issues with notifications to being received on the device end please see the troubleshooting guide below.

https://documentation.onesignal.com/docs/notifications-show-successful-but-are-not-being-shown

If the above guide doesn’t resolve the issue please contact OneSignal support so we can check your account.

Thanks.

It is working now! Thanks!

I am getting the same problem again with just one Android mobile not working.

I am using Corona SDK 2017.3044 (2017.2.23)

And I am using ASUS Zenfone (ASUS_Z016D (6.0.1))

I tried to delete cached files, uninstall the app, reinstall the app and open all the permissions. It is working now!

I am having a similar issue.

Building for Amazon and including both google plugins (below) with Build: 2017.3038. App compile  and installs, but when Onesignal init is called the user/player indicates that (Missing Google Play Services Library).

If I build for Google, I get the following error when starting the app:

“[app] relies on Google Play services, which cannot be maintained without the Google Play store. Contact the manufacturer for assistance.”

        [“plugin.gpgs”] = – new plugin

        {

            publisherId = “com.coronalabs”,

            supportedPlatforms = { android=true }

            

        },

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

        {

            publisherId = “com.coronalabs”,

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

        },

@guy.stockwell Starting with Corona build 2016.3005 and newer you no longer need plugin.google.play.services. I believe this applies to the plugin.gpgs as well as it no longer goes in the build.settings.

https://coronalabs.com/blog/2016/09/02/our-new-google-play-games-services-gpgs-plugin-is-available/

For Amazon builds to work correctly, make sure you have app_key.txt in the root of your project and the value is correct. Almost make sure you are testing on an Amazon device for these builds as a normal Android device can’t register with ADM push.

Thanks for the response. When I comment out the google plugins, compile for google, and install on a device I receive the error “Google Play store error, App relies on Google Play services which cannot be maintained without the google play store…” 

I continue to have issues with android builds and Corona. IOS works like a champ! I have followed the documentation and if I build for android and do not include the Google Play plugins (legacy or new) I get the following results when I try to execute the app in an android emulator.

Build with no target app store - Corona developer error: [app] does not target the Google play store but includes Google play services. This is adding unnecessary bloat to your app as Google play services depends on the Google play store. Please remove Google play services from bills that do not target Google play.

Build with a target app store Google play - Google play store error: [app] relies on Google play services, which cannot be maintained without the Google play store. Contact the manufacturer for assistance.

I’m using Corona build 2017.3046.

I am in contact with Josh at one signal, but would like to ask the Corona folks if they are aware of an issue as I describe since one of the errors is generated by Corona.

Can you post your build.settings please?

settings =

{

    splashScreen = 

    {

        enable = false

    },

    

    iphone =

    {

        plist=

        {    

            UIApplicationExitsOnSuspend = false,

            UIPrerenderedIcon = true,

            UIStatusBarHidden = true,

            MinimumOSVersion = “7.0”,

            

            NSAppTransportSecurity = {NSAllowsArbitraryLoads = true},

            UIBackgroundMode = { “remote-notification” },

            UIApplicationExitsOnSuspend = true, 

            UIPrerenderedIcon = true,

            UIStatusBarHidden = false,

            

            CFBundleDisplayName = “Alltech News”,

            CFBundleName = “Alltech News”,

            CFBundleIconFile = “Icon.png”,

            CFBundleIconFiles = {

                “appicon.png”,

                “appicon@2x.png”,

                –                “appicon-60.png”,

                “appicon-60@2x.png”,

                “appicon-60@3x.png”,

                “appicon-72.png”,

                “appicon-72@2x.png”,

                “appicon-76.png”,

                “appicon-76@2x.png”,

                –                “appicon-167.png”,

                “appicon-Small-40.png”,

                “appicon-Small-40@2x.png”,

                “appicon-Small-40@3x.png”,

                “appicon-Small-50.png”,

                “appicon-Small-50@2x.png”,

                “appicon-Small.png”,

                “appicon-Small@2x.png”,

                “appicon-Small@3x.png”

            },  

            UILaunchImages = {

                {  – iPhone 4 Portrait

                    [“UILaunchImageMinimumOSVersion”] = “7.0”,

                    [“UILaunchImageName”] = “Default”,

                    [“UILaunchImageOrientation”] = “Portrait”,

                    [“UILaunchImageSize”] = “{320, 480}”

                },

                {  – iPhone 5 Portrait

                    [“UILaunchImageMinimumOSVersion”] = “7.0”,

                    [“UILaunchImageName”] = “Default-568h”,

                    [“UILaunchImageOrientation”] = “Portrait”,

                    [“UILaunchImageSize”] = “{320, 568}”

                },

                {  – iPhone 6 Portrait

                    [“UILaunchImageMinimumOSVersion”] = “8.0”,

                    [“UILaunchImageName”] = “Default-667h”,

                    [“UILaunchImageOrientation”] = “Portrait”,

                    [“UILaunchImageSize”] = “{375, 667}”

                },

                {  – iPhone 6 Plus Portrait

                    [“UILaunchImageMinimumOSVersion”] = “8.0”,

                    [“UILaunchImageName”] = “Default-736h”,

                    [“UILaunchImageOrientation”] = “Portrait”,

                    [“UILaunchImageSize”] = “{414, 736}”

                },

            },

        },

    },

    

    orientation =

    {

        default = “portrait”,

        supported =

        {

            “portait”, “portraitUpsideDown”, 

        },

    },

    

    android = – see developer.android.com/reference/android/Manifest.permission.html for all values

    {

        –        permissions = 

        –        {

        –            { name = “.permission.C2D_MESSAGE”, protectionLevel = “signature” },

        –        },

        

–        googlePlayGamesAppId = “1234567890”, – new plugin

        usesPermissions =

        {

            “android.permission.INTERNET”,

            “android.permission.GET_ACCOUNTS”,

            “android.permission.RECEIVE_BOOT_COMPLETED”,

–            “com.google.android.c2dm.permission.RECEIVE”, – old plugin

            “android.permission.C2D_MESSAGE”,

            “android.permission.ACCESS_NETWORK_STATE”,

            “android.permission.ACCESS_WIFI_STATE”,

            “android.permission.ACCESS_FINE_LOCATION”,

            “android.permission.ACCESS_COARSE_LOCATION”,

            “android.permission.WRITE_EXTERNAL_STORAGE”,

            “android.permission.CALL_PHONE”,

            “android.permission.CALL_PRIVILEGED”,

            “android.permission.PROCESS_OUTGOING_CALLS”,

            “android.permission.READ_PHONE_STATE”,

            “android.permission.CAMERA”,

            “android.permission.WRITE_EXTERNAL_STORAGE”,

            

        },

        usesFeatures =

        {

            { name = “android.hardware.location”, required = false },

            { name = “android.hardware.location.gps”, required = false },

            { name = “android.hardware.location.network”, required = false },

        },

    },

    

    plugins =

    {

        [“plugin.OneSignal”] =

        {

            publisherId = “com.onesignal”,

        },  

        [“plugin.notifications”] =

        {

            publisherId = “com.coronalabs”

        },

        [“plugin.openudid”] =

        {

            publisherId = “com.coronalabs”,

            supportedPlatforms = { iphone=true },

        },

        

–        [‘plugin.qrscanner’] = 

–        {

–            publisherId = ‘com.spiralcodestudio’

–        },

–        [“plugin.gpgs”] = – new plugin

–        {

–            publisherId = “com.coronalabs”,

–            supportedPlatforms = { android=true }

–            

–        },

–        [“CoronaProvider.native.popup.quickLook”] =

–        {

–            publisherId = “com.coronalabs”,

–            supportedPlatforms = { iphone=true }

–        },

    },  

    

}

@guy.stockwell

It looks like you’re trying to run an APK built for the Google Play Store on an Amazon device.

That’s not possible as Amazon devices don’t have the Google Play Services APK installed on the device which is why you’re seeing the error.

To use OneSignal with an Amazon device you must build for the Amazon store. I tried building a simple test app (using the notifications and OneSignal plugin) and targeted the Amazon store. I didn’t see any error messages when starting the app on a Kindle Fire HD 6. 

Apologies for any confusion. My objective is to build an Android version for enterprise distribution. I have IOS working without issue. 

When you say “Enterprise” are you referring to using Corona Enterprise or “I’m building an app to share among people in my company and I’m not putting on a store”?

Rob

The latter

In that case I’d say you will need 2 APKs:

  1. A Google Play Store build for “normal” Android devices (that have Google Play Store on them by default)

  2. An Amazon build for Kindle devices.

I just tried to downgrade Corona SDK to 3004. The “Missing Google Play Services Library” gone BUT when I tried to send a test message from the OneSignal Web Panel to my Android device, I can see the notification has been sent on OneSignal Panel but I can’t get the notification on my Android.

The OneSignal plugin has been updated for Corona build 3005+ to fix the library missing issue. No changes are need, rebuilding your app will include the needed Google Play services library files now.

If you continue to see issues with notifications to being received on the device end please see the troubleshooting guide below.

https://documentation.onesignal.com/docs/notifications-show-successful-but-are-not-being-shown

If the above guide doesn’t resolve the issue please contact OneSignal support so we can check your account.

Thanks.

It is working now! Thanks!