How can i use older version of google play services?

前端 未结 2 364
一整个雨季
一整个雨季 2021-01-14 09:15

I\'m using Google Cloud messaging through google play services. The things is it only works on the devices with last version of play services installed, in remaining devices

相关标签:
2条回答
  • 2021-01-14 09:38

    There is a solution for android studio:

    1.Close your project

    2.Browse to the folder where your projects has been saved

    3.Go to folder 'app' and open the file 'build.gradle'

    1. find this line :

      compile 'com.google.android.gms:play-services:7.3.0'

    and change the version (here 7.3.0) to an older one (like 6.5.87). You can find out available versions by looking at sdk/extras/google/m2repository/com/google/android/gms/play-services

    5.open the project again

    0 讨论(0)
  • 2021-01-14 09:55

    Unfortunately Google Cloud Messaging was only added to the Play Services API in version 7.5, which was released end of May 2015 (see this Android Developers Blog post).

    So, if you manage to find a copy of the v7.5 API (see my question regarding that here) or if the suggestion above by @Babak is safe (still investigating that one... and you can only go down to 7.5.0 before you lose GCM support), you might be able to gain a few months, but it will likely not make a huge difference...

    Actually, I just noticed that your question was also posted end of May... So you probably won't be able to gain anything. But you may reduce support of you move to a new API version later!

    0 讨论(0)
提交回复
热议问题