Android Places API: Google Play Services Out of Date on Emulator

后端 未结 9 1673
鱼传尺愫
鱼传尺愫 2021-01-01 10:46

I am attempting to utilize the Google Places API\'s PlacePicker in my Android app. However, whenever I attempt to create the picker, I receive the following error message:

相关标签:
9条回答
  • 2021-01-01 11:22

    I have a similar problem when I use Google-Play-services on android wear, then I solve it by updated my android wear app version. (because newer android wear version include newer Google-Play-services)

    This problem cause by the version of Google-Play-services on your device is too old, you should update your version of Google-Play-services on your device.

    For the emulator, you need to update Google-Play-services on your emulator instead of update your SDK.

    0 讨论(0)
  • 2021-01-01 11:25

    I had the same problem and right now I "updated" the version to 6774480 invalidating the caches and restarting, then i "downgraded" the dependecies compile 'com.google.android.gms:play-services:6+' and it works, I know that is not a real solution but is a bad way to make it works so I can test my app

    0 讨论(0)
  • 2021-01-01 11:28

    As others said, the reason is likely to be the Google Play installed in the AVD doesn't match dependency requirement. Besides the solutions suggested by others, I tried to lower my required Google Play version to 8.1 from 8.3, and the problem is solved.

    0 讨论(0)
  • 2021-01-01 11:37

    If the SDK Manager shows that you already have the latest version installed, you can simply duplicate your emulator definition.

    The duplicated emulator will be loaded with the latest version of the SDK.

    0 讨论(0)
  • 2021-01-01 11:38

    This is a workaround that I came up with since none of the solutions here worked for me. Also, I didnt want to update my code to use an older version of play services. I ended up installing the emulator with google play instead of google apis and then when the prompt came up I simply clicked update. This would take you to the google play store and all you have to do is update play services from there. Only caveat here is that this method requires you to sign in to the emulator with a google account. But for my use cases it was sufficient.

    0 讨论(0)
  • 2021-01-01 11:40

    I only had this issue with the API 22 emulator. 21 and 23 were fine and I had no issues with physical devices.

    I was curious to know whether or not this low version was critical for GCM, so modified the code to proceed anyway:

    if (checkPlayServices()) {
                  // Start IntentService to register this application with GCM.
                  Intent intent = new Intent(this, ImpatientRegistrationIntentService.class);
                  startService(intent);
    } else {<<--   Added this as a bypass as my emulator complained about versions
                  Intent intent = new Intent(this, ImpatientRegistrationIntentService.class);
                  startService(intent);
    }
    

    Interestingly, the API 22 emulator got a token from GCM and received downstream push messages without any problem.

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