“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条回答
Evening l夕情丶
2楼-- · 2019-01-03 10:20

Thanks Thano for the solution "Now this bug as i noticed (at least for me) was that in my cloud console, the project i have created was long ago with the old interface and few months ago i migrated to the new GUI.Once you get the new look on cloud console you will notice that new projects have an auto generated project id like this atlantean-ares-331 while old projects got a long integer value as project id which is not visible. So if your project was created with the old GUI and you have just created new client id for OAuth for that project you will get the Toast "An internal error occurred” while trying to sign in with google."

查看更多
Melony?
3楼-- · 2019-01-03 10:20

If your facing this error when you try to run the sample application "or" copy the project which you have created in other machine which was running successfully in that and giving such pop-up error in the other machine where you are trying to run ,you can follow the below method and it will help.

If your are building the app for testing/debug purpose then,

1.Generate the new SHA1 if you copy your project and run it on other machine for the package name and path provided for keystore.

2.Change the ClientId in developers console for new generated SHA1 and run it in the new machine where you have copied the project and trying to run it.

查看更多
Emotional °昔
4楼-- · 2019-01-03 10:22

I went through all the answers provided here and others as well. In my case the issue was the SHA-1 as well. The reason I was getting the incorrect SHA-1 was my keytool export cert command.

Previously I was using

C:\Users\mysuername\.android SHA 1 signature keytool -exportcert -alias androiddebugkey -keystore "keystorepath" -list -v

The problem was in the androiddebugkey variable. Here you have to give the name of the key you use for signing the application.

C:\Users\mysuername\.android SHA 1 signature keytool -exportcert -alias mykeyname -keystore "keystorepath" -list -v

Hope this helps someone!

查看更多
趁早两清
5楼-- · 2019-01-03 10:23

I have this problem and even after creating 10 different client IDs with different SHA and package name, it doesn't work... until I found out that you have to fill the Consent screen.

According to GoogleDevelopers Console -

The consent screen will be shown to users whenever you request access to their private data using your client ID.

Consent screen

查看更多
我想做一个坏孩纸
6楼-- · 2019-01-03 10:23

Remember to use the built-in debug keystore for testing. I had everything else working correctly, but I had set my production keystore SHA1 fingerprint in the Credentials in the Developers Console, which caused it not to work.

查看更多
我欲成王,谁敢阻挡
7楼-- · 2019-01-03 10:23

To add to this long list of reasons my problem was that i got the debugkey from the jks file rather than the app.

Its always something small.

查看更多
登录 后发表回答