Get started with Play Games Services for Android games
Stay organized with collections
Save and categorize content based on your preferences.
This guide describes how to set up an Android Studio project to use the
Play Games Services SDK. You must complete these steps before you
set up Play Games Services sign-in and add
Play Games Services features to your game.
Before you begin
To prepare your app, complete the steps in the following sections.
App prerequisites
Make sure that your app's build file uses the following values:
- A
minSdkVersion
of 19
of higher
- A
compileSdkVersion
of 28
or higher
Set up your game in Google Play Console
The Google Play Console is where you manage Google Play games services for your
game, and configure metadata for authorizing and authenticating your game. For
more information, see
Set Up Google Play Games Services.
In your project-level build.gradle
file, include
Google's Maven repository
and Maven central repository
in both your buildscript
and allprojects
sections:
buildscript {
repositories {
google()
mavenCentral()
}
}
allprojects {
repositories {
google()
mavenCentral()
}
}
Add the Google Play services
dependency for the Play Games SDK to your
module's Gradle build file, which is commonly
app/build.gradle
:
dependencies {
implementation "com.google.android.gms:play-services-games-v2:+"
}
After completing these steps you must set up
sign-in
in order for the game to access Play Games Services features.
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-01-30 UTC.
[null,null,["Last updated 2025-01-30 UTC."],[],[],null,["# Get started with Play Games Services for Android games\n\n| **Note:** This guide is for the Play Games Services v2 SDK. For information on the previous version of this SDK, see the [Play Games Services v1\n| documentation](/games/pgs/v1/android).\n\nThis guide describes how to set up an Android Studio project to use the\nPlay Games Services SDK. You must complete these steps before you\nset up Play Games Services [sign-in](/games/pgs/android/android-signin) and add\nPlay Games Services features to your game.\n\nBefore you begin\n----------------\n\nTo prepare your app, complete the steps in the following sections.\n\n### App prerequisites\n\nMake sure that your app's build file uses the following values:\n\n- A `minSdkVersion` of `19` of higher\n- A `compileSdkVersion` of `28` or higher\n\n### Set up your game in Google Play Console\n\nThe Google Play Console is where you manage Google Play games services for your\ngame, and configure metadata for authorizing and authenticating your game. For\nmore information, see\n[Set Up Google Play Games Services](/games/pgs/console/setup).\n\nConfigure your app\n------------------\n\nIn your project-level `build.gradle` file, include\n[Google's Maven repository](https://maven.google.com/web/index.html)\nand [Maven central repository](https://search.maven.org/artifact)\nin both your `buildscript` and `allprojects` sections: \n\n buildscript {\n repositories {\n google()\n mavenCentral()\n }\n }\n\n allprojects {\n repositories {\n google()\n mavenCentral()\n }\n }\n\nAdd the [Google Play services](https://developers.google.com/android)\ndependency for the Play Games SDK to your\n[module's Gradle build file](/studio/build#module-level), which is commonly\n\n`app/build.gradle`: \n\n dependencies {\n implementation \"com.google.android.gms:play-services-games-v2:+\"\n }\n\nAfter completing these steps you must set up\n[sign-in](/games/pgs/android/android-signin)\nin order for the game to access Play Games Services features."]]