问题描述:

I am attempting to run some sample Android Pay API code following the guide here:

https://developers.google.com/android-pay/android/tutorial#setup

I'm using the sample Bikestore project provided in the link above. I followed the instructions to setup credentials/client ID for my app:

  • Google Developers Console
  • Created an Android Client ID for OAuth 2.0 using SHA1 fingerprint and entering the app's package name.

The app installs/runs successfully on my cell phone (Lollipop), however when attempting to "Login", it displays "An error occurring while contacting Google. Please try again later"

网友答案:

I believe I've found a solution. In the sample project, the following dependencies were defined in build.gradle:

dependencies {
    compile 'com.android.support:support-v4:22.2.0'
    compile 'com.google.android.gms:play-services-plus:7.8.0'
    compile 'com.google.android.gms:play-services-wallet:7.8.0'
}

I added the following line and this seems to have fixed the connection issue:

compile 'com.google.android.gms:play-services:7.8.0'
相关阅读:
Top