“An internal error occurred” with integration of G

2019-01-03 09:43发布

I am trying to integrate a Google plus Login in my application as per the instruction provided by following link : https://developers.google.com/+/quickstart/android#install-sdk

I am following all the instructions perfectly. And when I run the sample application on a real device provided in the android-sdk and click the signin button, it display a Toast message that An internal error occurred

What am I doing wrong?

20条回答
女痞
2楼-- · 2019-01-03 10:25

In my case the problem was that I changed the package name of the app and didn't update in dev console.

查看更多
Luminary・发光体
3楼-- · 2019-01-03 10:27

In my case, the solution was to actually set an email address in the Consent Screen. First, I was a bit reluctant to select my personal address and for an strange reason you can save the form without this piece of data with no error. After checking what others have suggested, as soon as I set my email address in that form, it started working.

查看更多
对你真心纯属浪费
4楼-- · 2019-01-03 10:27

This problem is related to the permissions from the api console.

if you are using a permission related with SCOPE_PLUS_LOGIN, in the api console you must create two keys, one for OAuth client id, and other for public api key.

查看更多
\"骚年 ilove
5楼-- · 2019-01-03 10:29

Recreating the project in the Google Console worked for me after several other attempts:

For any reason my project did not have a project ID (old console/new console?).

As Thano (above) suggested, I created a brand new project, created Client IDs, ... and then in worked. Thanks for the advice!!

查看更多
Explosion°爆炸
6楼-- · 2019-01-03 10:31

I got this toast message error in my android application:

An internal error occurred

Summary:

Assuming you made a mistake configuring the negotiation between your android app and the Android API server granting you access. Most likely caused by you not adding the correct package name or correct SHA1 fingerprint. I followed these steps to blow out the wrong configuration and do it right.

Steps to fix:

  1. Go to your google api console and login: https://code.google.com/apis/console

  2. Click "API Access" tab.

  3. Click the button: "Create another client ID".

  4. Choose: "Installed Application" radio button.

  5. Choose: "Android" radio button.

  6. Enter the package name of the android app that is displaying the above error. You can find it defined at the top of the PlusSampleActivity.java code file. For me it is com.google.android.gms.samples.plus

  7. Acquire your SHA1 fingerprint value:

    a. Use the command keytool -list -v -keystore /home/el/.android/debug.keystore. Enter password, If you never set it, the default password is 'android'.

    b. The SHA1 fingerprint is shown on screen, copy that.

  8. Paste the above value into the "Signing certificate fingerprint (SHA1):" box.

  9. Click the button: "Create client ID".

  10. Run your android application again, click "Sign in".

Now you are presented with an Activity to "Sign in to Google+ SDK with Google".

查看更多
相关推荐>>
7楼-- · 2019-01-03 10:33

This can happen when you haven't set the signature for the client ID in your API console project, or if you copied the wrong key value from keytool. Doing so is documented in the steps of the quick start guide on steps 7, 8, 9, and 10.

查看更多
登录 后发表回答