AI Studio → Android

Deploy to Replit

This is a drop-in alternative to Part 4 — use it instead of Vercel, not in addition to it. Same GitHub repo, different host.

Alternative path

New in v4.0 — added September 2026

Why you might pick Replit instead of Vercel. Replit's Static Deployments are free on every plan — including the free account tier — with no "non-commercial use only" restriction, which Vercel's Hobby plan has. It's a good fit if you plan to eventually charge for your app, or if you'd rather do all your editing (repo, redeploys, custom domain) in one dashboard. The trade-off: your Gemini API calls happen client-side against a key you embed as a static build variable, so treat that key as public-facing and restrict it accordingly — see the security note in Step R3.
  1. R1

    Create a Replit Account

    Go to replit.com → Sign up → Continue with GitHub (recommended, same reasoning as the Vercel step — it links the accounts for you). Free accounts can create and publish Static Deployments with no time limit.

  2. R2

    Import Your GitHub Repository

    From the Replit home screen, click Create App → Import from GitHub, and select the repository you exported from AI Studio in Part 3. Replit clones it into a new workspace ("Repl") and detects it's a Vite project automatically.

  3. R3

    Add Your Gemini API Key as a Secret

    Most critical

    Open the Secrets tool in the left tool dock (padlock icon). Add a key named GEMINI_API_KEY with your key from AI Studio's API Keys page as the value. Because a static build exposes any variable prefixed for the client bundle, also add VITE_API_KEY with the same value if your code reads it that way — check your src folder for the exact variable name your app uses.

    Restrict this key. A key baked into a static, client-side build can be read by anyone who inspects your app's network requests. In Google AI Studio's API Keys page, restrict the key to the Generative Language API only, and keep an eye on usage. This is different from the Vercel/Cloud Run path, where the key stays server-side.
  4. R4

    Configure the Static Deployment

    Click Deploy at the top right, choose Static, and set:

    deployment settings
    Build command:   npm run build
    Public directory: dist

    Vite's default output folder is dist — confirm this matches vite.config.ts in your repo before deploying. Static Deployments only serve files; they can't run a backend, which is fine here since your app calls the Gemini API directly from the browser.

  5. R5

    Publish & Go Live

    Final click

    Click Deploy. Replit builds your app and serves it over HTTPS at your-app-name.replit.app — installable as a PWA exactly like a Vercel URL, once Part 3's manifest.json and script tag are in place. Continue to Part 5 — Install on Android using this URL instead of your Vercel one.

    Free tier reminder: Static Deployments are free hosting on any Replit plan, including data transfer up to your plan's allocation (100 GiB/month on Core; a smaller allowance on the free tier) before per-GB charges apply. See the comparison table on the Best Practices page.
Updating later. Replit doesn't auto-redeploy on every GitHub push the way Vercel does. After you update your app in AI Studio and export to GitHub again, open your Repl, pull the latest changes (Version Control tab → Pull), and click Deploy again to publish the new build.

Other static hosts that work the same way

Any host that can build a Vite project from a GitHub repo and serve static files over HTTPS will work for this pipeline — the manifest and script-tag setup from Part 3 doesn't change. Two more worth knowing:

Netlify

Similar to Vercel

Sign up with "Continue with GitHub", Add new site → Import an existing project, pick your repo. Build command npm run build, publish directory dist. Add your key under Site configuration → Environment variables. Free tier allows commercial use, unlike Vercel Hobby — around 100 GB bandwidth and 300 build minutes a month.

Cloudflare Pages

Best free bandwidth

Sign up at pages.cloudflare.com, Connect to Git, select your repo, same build settings as above. Environment variables live under Settings → Environment variables. Cloudflare's free tier has no bandwidth cap, which makes it a strong pick if you expect real traffic.

Don't forget the built-in option. Since Google AI Studio's May 2026 update, you can also skip GitHub and a third-party host entirely and click Publish directly inside AI Studio's Build mode to deploy to Google Cloud Run — your first two apps are free under the Cloud Run Starter Tier, no billing account required. See Part 2 for when that's the faster choice.