Good day everyone.
I'm trying to implement Achievements in a game I'm developing.
I already set everything on google play console, got the app-id, put in the manifest the following
<meta-data
android:name="com.google.android.gms.games.APP_ID"
android:value="@string/app_id" />
and wrote the following method
GoogleApiAvailability googleApiAvailability = GoogleApiAvailability.getInstance();
int temp = googleApiAvailability.isGooglePlayServicesAvailable(this);
if ( temp != 0)
return;
GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_GAMES_SIGN_IN)
.requestEmail()
.build();
GoogleSignIn.getClient(this, gso);
GoogleSignInAccount account = GoogleSignIn.getLastSignedInAccount(this);
PlayersClient player = Games.getPlayersClient(this, account);
When I run it I get my account, but as it runs Games.getPlayersClient(this, account);
I get the following error:
java.lang.IllegalStateException: Games APIs requires https://www.googleapis.com/auth/games_lite function.
Anybody as any idea what could be wrong?
Thanks in advance.
See Question&Answers more detail:os