This app won't run unless you update google play services


#1

i’ve added nativescript-geolocation plugin but i’m unable to use it (API Level 17) because i’m getting the error This app won't run unless you update google play services

I’ve tried to force a specific google play service version in App_Resources/Android/app.gradle:

compile 'com.google.android.gms:play-services-location:11.0.4'

but this won’t solve the issue. How can I update google app services on the emulator ? I thought that gradle would update it automatically… (i’m using an emulator image with Google API)


#2

I haven’t used this plugin, but this issue is stated in the plugin page as follows

Known Issues
Version Conflicts – Google Play Services
If you have installed multiple plugins that use the Google Play Services you might run into version conflicts. In order to fix this you might pin the version number in your app/App_Resources/Android/app.gradle file:

android {  
  // other stuff here

  project.ext {
    googlePlayServicesVersion = "11.2.+"
  }
}

Check the github issues like this one https://github.com/NativeScript/nativescript-geolocation/issues/81


#3

Already tried.
I don’t have any other plugin installed and forcing a version doesn’t solve the issue, as I don’t have that specific version on the emulator.

Stock version is 9.2 and I don’t know how to update


#4

Maybe this link will be of a help to you https://github.com/NativeScript/android-runtime/issues/878

so try

tns platform update android    

as it seem there was a hot fix for android in version 3.3.1 that may help overcome your issue


#5

I’m already at 3.3.1.
It’s a brand new project, created 2 days ago.


#6

Keep in mind that i’m on Android 4.2 (API 17) and I don’t want to update, as I have to target Android 4.2


#7

Noone ?

Is gradle supposed to automatically install/update the needed apk to the emulator or should I provide it on my own?
Because I don’t know how to manually update google services from the emulator, as I don’t have google play store installed.


#8

any help ? I’m really stuck at this


#9

please check your android sdk for play service location for available version. for me the path is D:\androidsdk\extras\google\m2repository\com\google\android\gms\play-services-location


#10

Am facing the same problem. Hope anyone here can help me too. Thanks in advance. Regards,