I am trying to include PlusOneButton in my android app. I created an app in google cloud console with SHA-1 from my debug.keystore as described in google ( https://developers.google.com/+/mobile/android/getting-started?hl=en ).
In my XML layout, I add + 1-Button:
<com.google.android.gms.plus.PlusOneButton android:id="@+id/btnPlusOne" android:layout_width="wrap_content" android:layout_height="wrap_content" plus:size="standard" />
In my work, I override the onResume () method. Of course, I first return the object via findViewById (...):
public void onResume() { super.onResume(); btnPlusOne.initialize("http://www.google.de", REQUEST_CODE_PLUS_ONE); }
I also grant permissions in the manifest:
<uses-permission android:name="android.permission.INTERNET"/> <uses-permission android:name="android.permission.GET_ACCOUNTS" /> <uses-permission android:name="android.permission.USE_CREDENTIALS" />
But if I run the application, then PlusOneButton looks gray. If I click on it, a progress indicator will appear in the button and will be infinite. In Logcat, I get this message:
18367-18367/? W/PlusOneButtonView﹕ Failed to establish connection with status: 8
If I checked this in the API Doc ( http://developer.android.com/reference/com/google/android/gms/common/ConnectionResult.html#INTERNAL_ERROR ), it says something like an internal error. But at the moment I have no idea what can solve this problem?
source share