private void handleSignInResult(Task<GoogleSignInAccount> completedTask) {
try {
GoogleSignInAccount account = completedTask.getResult(ApiException.class); //exception is here
// Signed in successfully, show authenticated UI.
System.out.println("google token ---> " + account.getIdToken());
} catch (ApiException e) {
// The ApiException status code indicates the detailed failure reason.
// Please refer to the GoogleSignInStatusCodes class reference for more information about this error.
e.printStackTrace();
}
}
7
A
Antwort
5
Dieser Statuscode bedeutet, dass Sie eine unbekannte Server-Client-ID angeben. In https://console.developers.google.com/apis/credentials in Ihrem Projekt müssen Sie möglicherweise generieren: OAuth-Client-ID -> Web Application und verwenden Sie diese Webanwendung Client-ID in Ihrer Android App.
+0
Es könnte auch sein, dass Sie Ihr Paket nicht in derselben https://console.developers.google.com/apis/credentials hinzufügen oder falsch geschrieben haben, sondern in der OAuth 2.0-Client-ID für Android. – bojan
Verwandte Themen
- 1. Google Anmelden fehlgeschlagen com.google.android.gms.common.api.ApiException: 10:
- 2. Warum bekomme ich Syntaxfehler?
- 3. Warum bekomme ich Fehler
- 4. com.google.android.gms.common.api.ApiException während der Herstellung von shorturl
- 5. RuntimeExecutionException: com.google.android.gms.common.api.ApiException: 13: Fehler Places API
- 6. Warum bekomme ich NameError?
- 7. Warum bekomme ich NoMethodError?
- 8. Warum bekomme ich NSUnkownKeyException?
- 9. Warum bekomme ich PingException?
- 10. Warum bekomme ich "Win32Exception"?
- 11. Warum bekomme ich MissingResourceException
- 12. Warum bekomme ich SecurityTokenSignatureKeyNotFoundException?
- 13. Warum bekomme ich System.Data.DataRow?
- 14. Warum bekomme ich Deadlock
- 15. Warum bekomme ich NoSuchMethodException?
- 16. Warum bekomme ich AuthenticationCredentialsNotFoundException?
- 17. Warum bekomme ich javax.mail.MessagingException?
- 18. Warum bekomme ich einen Syntaxfehler
- 19. Warum bekomme ich eine ConcurrentModificationException?
- 20. Warum ist {10 + '1'} + 10 gleich 10?
- 21. Windows 10 bekomme DeviceFamilyVersion
- 22. Warum bekomme ich null wenn ichElementById bekomme?
- 23. Warum bekomme ich Spalteneinträge mit leeren Werten?
- 24. Warum bekomme ich Zlib :: DataError?
- 25. keras - warum bekomme ich am Ausgang nan?
- 26. Warum bekomme ich ein Nullobjekt?
- 27. Warum bekomme ich diesen Compilerfehler?
- 28. Warum bekomme ich "disconnected framework"?
- 29. Warum bekomme ich undefinierten Wert
- 30. Warum bekomme ich eine "Gleitkommaausnahme"
Haben Sie die 2 Zeilen gelesen, die Sie in den Kommentaren im 'catch' Block haben? – pleft
Eigentlich tat ich, aber es gibt nichts über Statuscode 10: also verstehe ich es nicht. –