> ## Documentation Index
> Fetch the complete documentation index at: https://docs.shipnative.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Android Deployment

> Build and submit your app to the Google Play Store

Ship your app to Google Play using EAS Build. This guide covers building, signing, and submitting your Android app.

## Prerequisites

Before you begin, ensure you have:

* A **Google Play Developer account**.
* **Java Development Kit (JDK)** installed.
* **Android Studio** installed (optional, but useful for emulator setup).
* **EAS CLI** installed (`yarn global add eas-cli` or `npm install -g eas-cli`).
* Your app's **Package Name** configured (e.g., `com.yourcompany.yourapp`) during `yarn setup`.

## 1. Configure `app.json`

Ensure your `app.json` file (located in `apps/app/app.json`) is correctly configured for Android. Key properties include:

* `expo.name`: Your app's display name.
* `expo.slug`: A URL-friendly name for your app.
* `expo.version`: Your app's version string (e.g., "1.0.0").
* `expo.android.package`: Your unique Android package name (e.g., `com.yourcompany.yourapp`).
* `expo.android.versionCode`: Your app's version code (an integer that must be incremented for each new build).

```json theme={null}
{
  "expo": {
    "name": "My Shipnative App",
    "slug": "my-shipnative-app",
    "version": "1.0.0",
    "orientation": "portrait",
    "icon": "./assets/icon.png",
    "userInterfaceStyle": "automatic",
    "splash": {
      "image": "./assets/splash.png",
      "resizeMode": "contain",
      "backgroundColor": "#ffffff"
    },
    "assetBundlePatterns": [
      "**/*"
    ],
    "ios": {
      // ... iOS specific configurations
    },
    "android": {
      "adaptiveIcon": {
        "foregroundImage": "./assets/adaptive-icon.png",
        "backgroundColor": "#ffffff"
      },
      "package": "com.yourcompany.yourapp", // IMPORTANT: Your unique package name
      "versionCode": 1 // Increment this for each new build
    },
    "web": {
      // ... Web specific configurations
    },
    "plugins": [
      [
        "expo-notifications",
        {
          "icon": "./assets/notification-icon.png",
          "color": "#000000"
        }
      ]
    ],
    "extra": {
      "router": {
        "origin": false
      },
      "eas": {
        "projectId": "YOUR_EAS_PROJECT_ID" // Replace with your EAS Project ID
      }
    }
  }
}
```

<Tip>
  If you ran `yarn setup`, your `package` name and other basic Android settings should already be configured.
</Tip>

## 2. Create an EAS Build Profile

EAS Build uses profiles to define how your app is built. You'll typically have `development`, `preview`, and `production` profiles.

Open `eas.json` (in your `shipnativeapp/` directory) and ensure you have a `production` profile for Android:

```json theme={null}
{
  "cli": {
    "version": ">= 3.15.1"
  },
  "build": {
    "production": {
      "node": "20.19.0"
    },
    "development": {
      "extends": "production",
      "distribution": "internal",
      "android": {
        "gradleCommand": ":app:assembleDebug"
      }
    },
    "preview": {
      "extends": "production",
      "distribution": "internal",
      "android": {
        "buildType": "apk"
      }
    }
  },
  "submit": {
    "production": {}
  }
}
```

<Tip>
  The `node: "20.19.0"` setting ensures consistent Node.js version across all EAS builds. Shipnative also bundles Yarn 4.x in `.yarn/releases/` for reliable builds without corepack conflicts.
</Tip>

## 3. Generate an Android Build

To create a production-ready `.aab` (Android App Bundle) or `.apk` file for the Play Store, use the EAS CLI:

```bash theme={null}
cd shipnative
eas build --platform android --profile production
```

This command will:

1. Start a new build on EAS servers.
2. Handle keystore and signing automatically (if configured in EAS).
3. Produce an `.aab` file (recommended for Play Store) or `.apk` file upon successful completion.

You can monitor the build status in your terminal or on the [EAS Dashboard](https://expo.dev/accounts/YOUR_USERNAME/projects/YOUR_PROJECT_SLUG/builds).

## 4. Submit to Google Play Console

Once your build is complete and you have the `.aab` file, you can submit it to the Google Play Console using EAS Submit:

```bash theme={null}
cd shipnative
eas submit --platform android --latest --profile production
```

This command will:

1. Prompt you for your Google Play service account key path (if not already configured in `eas.json`).
2. Upload the latest successful production build to the Google Play Console.
3. Create a new release in the specified track (e.g., `production`, `beta`).

<Tip>
  Alternatively, you can download the `.aab` file from the EAS Dashboard and upload it manually through the [Google Play Console](https://play.google.com/console).
</Tip>

## 5. Prepare for Review in Google Play Console

After successful submission, log in to the [Google Play Console](https://play.google.com/console) to:

* Add app listing details (description, screenshots, privacy policy).
* Configure pricing and distribution.
* Complete content rating questionnaire.
* Select the build you just uploaded for release.

## Troubleshooting

* **Build Failures:** Check the EAS build logs carefully for error messages. Common issues include incorrect package names, missing keystore configurations, or syntax errors in `app.json`.
* **Submission Errors:** Ensure your `eas.json` submit profile is correctly configured with your service account key and track. Verify that your app version code is incremented for new submissions.
* **Push Notifications:** If you're using push notifications, ensure you've configured Firebase Cloud Messaging (FCM) and placed `google-services.json` correctly, as described in the [Push Notifications](/core-features/push-notifications) guide.

## Resources

* **Expo Application Services (EAS) Documentation:** [https://docs.expo.dev/eas/build/](https://docs.expo.dev/eas/build/)
* **EAS Submit Documentation:** [https://docs.expo.dev/eas/submit/](https://docs.expo.dev/eas/submit/)
* **Google Play Console:** [https://play.google.com/console](https://play.google.com/console)
* **Google Play Developer Account:** [https://play.google.com/console/developers](https://play.google.com/console/developers)
