title: Google Play Games
body: <p>Good day everyone.</p>
  
  <p>I'm trying to implement Achievements in a game I'm developing.</p>
  
  <p>I already set everything on google play console, got the app-id, put in the manifest the following</p>
  
  <pre><code>    &lt;meta-data
          android:name="com.google.android.gms.games.APP_ID"
          android:value="@string/app_id" /&gt;
  </code></pre>
  
  <p>and wrote the following method</p>
  
  <pre><code>        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);
  </code></pre>
  
  <p>When I run it I get my account, but as it runs <code>Games.getPlayersClient(this, account);</code> I get the following error:</p>
  
  <blockquote>
    <p>java.lang.IllegalStateException: Games APIs requires
    <a href="https://www.googleapis.com/auth/games_lite" rel="nofollow noreferrer">https://www.googleapis.com/auth/games_lite</a> function.</p>
  </blockquote>
  
  <p>Anybody as any idea what could be wrong?</p>
  
  <p>Thanks in advance.</p>