Fastlane covers Android setup in Getting started – Android and uploads in upload_to_play_store. CI typically uses a JSON key file for a Google Cloud service account (json_key / PLAY_STORE_CREDENTIALS_PATH).
1. Enable the Google Play Android Developer API
- In Google Play Console: Settings (gear) → API access (wording may vary).
- Link a Google Cloud project (or use the suggested one).
- Enable the Google Play Android Developer API on that project (via the Play Console shortcut or Google Cloud Console).
2. Create a service account and key
- In Google Cloud Console for the linked project: IAM & Admin → Service Accounts → Create service account.
- Create a JSON key for that account and download it (single-line or pretty-printed JSON are both common).
3. Grant access in Play Console
- Return to Play Console under API access / Users and permissions.
- Invite the service account and assign at least the permissions your pipelines need (often a role that can manage releases; use narrower roles for internal tracks—see Google’s permission docs).
- Without this step,
upload_to_play_storefails with permission errors even with a valid JSON key.
4. Field in the Application Platform
For a Play Store credential, paste the full contents of the downloaded JSON into Play Store accounts JSON (playStoreCredentialsJson). That is the same payload Fastlane reads via json_key or PLAY_STORE_CREDENTIALS_PATH.
5. Package name / application ID
The Android application ID must match the app registered in Play Console. The platform passes it through generated project and pipeline configuration alongside the credentials.
Security
- Treat service account JSON like a password; store only in the platform’s protected credentials and restrict who can edit it.
- Rotate keys in Google Cloud if compromised and update the credential entry.