Toast : Internal Error Occur with integration of Google Plus in Android

前端 未结 4 1648
醉话见心
醉话见心 2021-01-12 04:37

I am integrating the Google Plus in my Android app. I have created the project in the Google API Console. I created the OAuth Client ID and I doubled check the package name

相关标签:
4条回答
  • 2021-01-12 05:05

    Do you get any output in logcat to go with the error? Try enabling verbose logging if you haven't (see https://developers.google.com/+/mobile/android/getting-started#frequently_asked_questions)

    adb shell setprop log.tag.GooglePlusPlatform VERBOSE
    

    Edit: Thanks for adding the logs. The GLS error is the interesting one there:

    I/GLSUser(1699): GLS error: INVALID_SCOPE xyz@gmail.com oauth2:PLUS_LOGIN

    Can you check that you have enabled the Google+ API in your API console project, and can you also try removing the setScopes line entirely (PLUS_LOGIN will be the default, so that seems the easiest way to test if anything interesting is going on).

    I'm not sure off the top of my head whether PLUS_LOGIN being in their is indicative of a replace not happening, or its just the logging looks like that, but remove the line should remove it from the equation.

    EDIT - based on your updated dump the scope now looks good but there is an invalid client Id error in there. Make sure there aren't any trailing spaces around your sha 1 in the client Id and that the package name exactly matches. Also try clearing the cache in google play service (clear data from the menu in the google settings app).

    0 讨论(0)
  • 2021-01-12 05:18

    you must fill the "Consent Screen", nothing else works if you do not fill the content in "Consent Screen".

    0 讨论(0)
  • 2021-01-12 05:23

    I had the same problem, and I solved it looking around in the Developer Console.

    Turns out that you need to fill in the necessary information about your project for the consent screen.

    Solution:

    • go to your Developer Console
    • APIs & Auth
    • Consent Screen

    Choose your email and insert your project name. Next time you launch your application you will have the proper consent screen and thereafter all will work fine.

    0 讨论(0)
  • 2021-01-12 05:23

    In my case, it took some time to see the consent screen. After making changes to the api console its better to wait 5-10 minutes and then try login process.

    0 讨论(0)
提交回复
热议问题