Home » Android » NativeScript – This app won't run unless you update Google Play Services

NativeScript – This app won't run unless you update Google Play Services

Posted by: admin November 1, 2017 Leave a comment

Questions:

I’m developing an app where I need to know the current location of the user.

I installed the nativescript-google-maps-sdkand I could see the map and place Markers, etc…

The problem started when I needed to get the current location, so I needed to install the plugin nativescript-geolocation.

And then I’ve been struggling with this error:
enter image description here

I saw some other posts there where they said that I needed to Target my Emulator to Google API’s and use a x86 Image.

Seeing the description of my emulator, I got this:
enter image description here

It’s a x86 targetting Google API’s.

Any idea?
Thanks in advance. 🙂

— UPDATE —
These are the packages that I got installed:
enter image description here

Answers:

Detecting geolocation on Android requires Google Play Services. You could solve this error by installing the latest version of Google Play Services through the Android SDK Manager.

It is accessible through the android command if you are using a UNIX-like operating system and the PATH includes Android SDK’s binary files location.

For a more visual guide, check this link: https://code.tutsplus.com/tutorials/integrating-google-play-services-on-android–cms-19828

Questions:
Answers:

You may try the suggested workarounds in this thread.

  • Reboot / restart device.
  • Go to settings > storage > cached data > clear cached data.
  • Go to settings > storage > apps > google play store > clear data.
  • Go to settings > storage > apps > download manager > clear data.
  • Go to settings > security > scroll down to Device administrators .
  • Tap on this and see Android device manager.
  • Next to this “uncheck” the box (Deactivate).
  • Go to settings > storage > apps > google play services > uninstall updates.
  • Leave the device for sometime.
  • Connect to internet and plugged the charger in.

Play services update automatically. If it not updates,

  • Open G+app or google map and this prompts to update.
  • Tap on update button.
  • Go to settings > Android device manager > activate.
  • Reboot / restart device.

Also from this post, Google Play Services is used to update Google apps and apps from Google Play and, this app would update automatically as long as you have a strong Internet connection (Wi-Fi or mobile data). There is no direct way to update Google Play Services manually.

However, I recommend you uninstall updates for Google Play Services and then restart your device so that Google Play Services would update automatically. Here’s how:

  1. Go to Settings > Apps or Application Manager > Google Play Services > touch the 3 vertical dots at the top and Uninstall updates.
  2. Restart your device.

Hope this helps!