Search code examples
androidgoogle-mapsadbgoogle-play-services

How to update Google Play Services through adb?


I have implemented an application with fresh Google Maps in time when device I've tested it on uses outdated one. It works fine while I used to build apk on Eclipse with fresh Google Play Services as dependency library project (as described there Google Play services out of date. Requires 3025100 but found 2012110). But when I have built apk with Android.mk with google-play-services.jar as LOCAL_STATIC_JAVA_LIBRARIES builded by the script application is crashed and GooglePlayServicesUtil throws an error:

Google Play services out of date.  Requires 4452000 but found 4034530

As it's expected the following statement is true:

GooglePlayServicesUtil.isGooglePlayServicesAvailable(context) == ConnectionResult.SERVICE_VERSION_UPDATE_REQUIRED

Is it possible to update Google Play Services on the devices with adb (it's unable to connect the device to Internet dirrectly)? Or maybe there is another suitable solution?


Solution

  • The solution is easy. You have to simple install Google Play Services.apk which (version 4.4.52) is presented here: [APK Compendium] Google Play Services 4.4.52 for All Densities, and the Rest of This Week’s Updates.

    I have java.lang.NoClassDefFoundError: com.google.android.gms.R$styleable now while I'm trying to inflate maps layout xml but this issue is out off topic.