Google android 应用上的 +1 按钮错误

Google +1 button error on android app there was a temporary

我根据本指南在我的应用程序中添加了 google 加一个按钮 https://developers.google.com/+/mobile/android/recommend

当我按下按钮时,我看到 google 加上 window 然后 window 收到我的 google 加上帐户名称 我收到错误消息 "There was a temporary problem with your +1. Please try again"

在android监视器中,我得到

10-14 19:05:42.466 2107-2470/com.google.android.gms.persistent W/GLSUser: [DeviceKeyStore] Cannot load key: Device key file not found.
10-14 19:05:42.872 2421-3058/com.google.android.gms E/Volley: [162] BasicNetwork.performRequest: Unexpected response code 503 for https://www.googleapis.com/pos/v1/plusones/https%3A%2F%2Fplay.google.com%2Fstore%2Fapps%2Fdetails%3Fid%3Dcom.facebook.katana?abtk=&cdx=c89&container=http%3A%2F%2FD1Xfy1LMHWn3O%252FW%252BIyo6pO5l5Yo%253D.apps.googleusercontent.com%2F%3Fpkg%3Dcom.bestvpn.hotvpn%26api_key%3DAIzaSyBa9bgzwtnGchlkux96-c5Q_fi19fE1pEA&source=native%3Aandroid_app

link 在 logcat

中的回答
{
 "kind": "pos#plusones",
 "id": "https://play.google.com/store/apps/details?id=com.facebook.katana",
 "isSetByViewer": false,
 "metadata": {
  "type": "URL",
  "globalCounts": {
   "count": 0.0
  }
 },
 "abtk": ""
}

我四个小时前在开发者控制台中打开了 google 加 API。

有人可以帮帮我吗?也许我忘了在任何地方检查 API 。已签入 google-services.json 也许是因为我正在从模拟器对其进行测试。现在无法在真机中测试

请使用下面的代码:

mPlusOneButton.setOnPlusOneClickListener(new OnPlusOneClickListener() {

    @Override
    public void onPlusOneClick(Intent intent) {
        if(!plusClient.isConnected()) {
            plusClient.connect();
        } else {
            startActivityForResult(intent, 0);
        }
    }

}

并在 android-sdk 中查看此 activity 以供参考:

androidsdk/extras/google/google_play_services/samples/plus/src/com/google/android/gms/samples/plus/PlusOneActivity.java

我已在 Google 问题跟踪器上报告了该问题,他们已将其关闭,因为不会修复并声明它已被弃用

https://issuetracker.google.com/issues/73993857