Version 2.0 Beginner — Intermediate 45–60 Minutes Internal Use

GOOGLE
AI STUDIO
→ ANDROID

A complete step-by-step guide to creating professional AI-powered Android apps using Google AI Studio, GitHub, and Vercel — no prior coding experience required.

6Parts
23Steps
3Platforms
PWAOutput
scroll to begin
What You'll Build

A production-ready AI app — live on the web, installable on Android

  • Fully functional AI-powered app (game, learning tool, chatbot, etc.)
  • Professional deployment on Vercel with automatic HTTPS
  • Installable Android PWA — no Play Store required
  • Update system: change once in AI Studio, auto-deploys everywhere
Technology Stack
FrontendVite + React + TypeScript
AI EngineGoogle Gemini API
Version ControlGitHub
HostingVercel
DeliveryProgressive Web App
Estimated Time
45–60
minutes
Beginner–Intermediate
Before You Begin
🌐 Stable internet connection
🌍 Chrome, Firefox, Safari, or Edge
📱 Android phone (optional)
⏱️ 45–60 mins of focused time
📖 Basic instruction-following ability
🔒 No child accounts on any service
⚠️
Security RulesNever share API keys publicly. Save all credentials in a password manager (LastPass, 1Password, Bitwarden).
Part 1
Steps 1–3

Account Setup

Create these three accounts in order. Each one unlocks the next part of the pipeline.

1
Create a Personal Gmail Account CRITICAL

Go to gmail.comCreate accountFor my personal use. Fill in your real name, choose a username carefully (this becomes your email address), and set a strong password (uppercase + lowercase + numbers + symbols). Add a recovery phone number and complete SMS verification.

🔐
Save your credentialsWrite down your Gmail address and password and store them in a password manager immediately.
2
Create a GitHub Account — Traditional Signup IMPORTANT

Go to github.comSign up. You CAN use your Gmail address, but you MUST create a separate password — different from your Gmail password. Choose a professional public username.

⚠️
Do NOT use "Sign up with Google"Traditional email/password signup gives you independent account control and avoids OAuth authentication issues with AI Studio integration later.

Complete the captcha, verify your email by clicking the link GitHub sends, and choose the Free plan.

3
Create a Vercel Account via GitHub ✓ Easy

Go to vercel.comSign Up → Select "Continue with GitHub" (do NOT use email or other social login). Log in with your GitHub credentials, click Authorize Vercel, choose the personal/hobby plan, and complete onboarding.

💡
Why link with GitHub?Every time you push code to GitHub, Vercel automatically rebuilds and redeploys your app. No manual uploads — ever.
Part 2
Steps 4–6

Build Your App in AI Studio

Describe your idea, let Gemini build it, test it thoroughly — then prepare it for deployment.

Good news!You don't need to set up Google Cloud manually. AI Studio automatically provides a free API key when you build your app.
4
Access Google AI Studio

Go to aistudio.google.com and sign in with your Gmail account. Look for Build, Create, or New in the left sidebar or main area.

5
Describe Your App Idea

Type what you want your app to do, or browse the sample template gallery. Example prompts:

example · game
"Create a trivia game about world geography with multiple difficulty levels, score tracking, and fun facts after each answer."
example · education
"Build a language learning assistant that helps users practice Spanish vocabulary and conversational phrases with interactive exercises."

AI Studio will generate your app in 30–60 seconds.

6
Test Your App ThoroughlyDon't skip

Use AI Studio's preview/test mode. Check: Does the AI respond appropriately? Are there errors? Does it handle unusual inputs gracefully? Refine instructions and adjust settings until you're completely satisfied.

💡
Pro Tip: Have someone else test your app to catch issues you might miss.
Part 3
Steps 7–11

The GitHub "Bridge"

Critical file configuration before you save to GitHub. Read every word of this section.

🚨
Most Important Section — Read CarefullyBefore you click "Save to GitHub," two essential files must be prepared in AI Studio. Skipping this step will cause your deployed app to show a blank page or fail to install on Android.
1
Configure index.html CRITICAL #1

Open index.html in the AI Studio code editor. Add exactly two lines — do NOT delete anything existing.

Line 1 — inside <head>, before </head>:

html
<link rel="manifest" href="/manifest.json">

Line 2 — inside <body>, after <div id="root"></div>:

html
<script type="module" src="/index.tsx"></script>
⚠️
Without the script tag → blank page. Without the manifest link → app not installable on Android.
2
Create manifest.json CRITICAL #2

Create a new file in the root folder named manifest.json. Paste and customize:

manifest.json
{
  "short_name": "YourApp",       // shown under icon
  "name": "Your Full App Name",
  "start_url": "/",
  "display": "standalone",       // native app look
  "theme_color": "#020617",
  "background_color": "#020617",
  "icons": [{
    "src": "https://cdn-icons-png.flaticon.com/512/1160/1160358.png",
    "type": "image/png",
    "sizes": "512x512"
  }]
}

Keep short_name under 12 characters. Change theme_color to match your app.

10
Save Your App to GitHub

In AI Studio, look for the GitHub icon and click "Save to GitHub" / "Export to GitHub". If prompted, authorize Google AI Studio in your GitHub settings. Set a repository name (lowercase + hyphens, e.g. my-ai-app), set visibility to Public, and click Save.

You'll see a confirmation: "All committed" or "Successfully saved to GitHub."

11
Verify Your GitHub RepositoryChecklist

Go to github.com and open your new repository. Confirm these files exist:

your-app-repo/ │ ├── index.html ← MUST have script tag + manifest link ├── manifest.json ← MUST exist with name, colors, icon ├── index.tsx or main.tsx — React entry point ├── package.json Node.js dependencies ├── vite.config.ts Build config ├── src/ Source code └── public/ Static assets
⚠️
If index.html or manifest.json are missing or incorrect, edit them directly on GitHub before deploying to Vercel.
Part 4
Steps 12–17

Deploy to Vercel

Get your API key, import the project, add environment variables, and go live.

12
Get Your Free API Key from AI Studio

Return to aistudio.google.com. Look for "Get API Key" (top-right or main dashboard) → click "Create API key". Copy the resulting key — it starts with AIzaSy...

🔐
Never commit this key to GitHub. Anyone with it can use your API quota. Store it in a password manager immediately.
13
Import Your Project to Vercel

Go to vercel.comAdd New… → Project. Vercel shows your GitHub repos — click Import next to your new repo. If it doesn't appear, click "Adjust GitHub App Permissions" and grant repository access.

15
Add Environment Variables MOST CRITICAL
🚨
Your app won't work without this step.Add your API key four times with four different variable names for maximum compatibility.
API_KEYAIzaSy… (your key)
VITE_API_KEYsame key
GEMINI_API_KEYsame key
GOOGLE_GENERATIVE_AI_API_KEYsame key

The three green dots = Production + Preview + Development. Leave all checked for each variable.

💡
Why four times? Different parts of the app (React code, Vite config, build process, runtime) may look for the API key under different names. Adding all four ensures compatibility regardless of how your code is structured.
16
Deploy & Go LiveFinal click

Scroll to the bottom of the Vercel configuration page and click the big Deploy button. The build takes 1–3 minutes. Watch the status:

⏳ Building… ✅ Ready ❌ Error → see troubleshooting

On success, you'll see confetti 🎉 and your live URL: your-project-name.vercel.app

Part 5
Steps 18–21

Install on Android

Transform your web app into a native-feeling Android experience with PWA technology.

18🌐
Open in Chrome
Open Chrome on your Android device (not other browsers — Chrome handles PWAs best). Navigate to your Vercel URL and wait for the page to fully load.
19📲
Install the App
Auto prompt: Tap "Add to Home Screen" if it appears. Manual: Tap ⋮ menu → "Install app" → Confirm. Takes 2–5 seconds.
20🚀
Launch & Test
Find your icon on the home screen (labeled with your manifest's short_name). Tap it — the app opens in standalone mode with no browser UI.
21📂
App Drawer Access
Your app also appears in the Android app drawer (swipe up from home). Long-press the icon for more options (uninstall, app info, move).
🎉
You now have a fully functional AI-powered Android app! Share your Vercel URL with anyone — they can access it in a browser or install it just like you did.
Part 6
Steps 22–23

Update Workflow

Understanding this SOP will save you hours of frustration every time you push changes.

⚠️
Known Issue: When you update your app in AI Studio and click "Save to GitHub" again, AI Studio may overwrite index.html — removing the critical <script> tag. This causes a blank page. The SOP below prevents this.
1

Make Changes in AI Studio

Update your app's features, AI behaviour, or interface. Test thoroughly in AI Studio's preview mode before doing anything else.

2

Re-check Critical Files in AI Studio — BEFORE Saving

Verify index.html still has the script tag. If missing, add it back now:

html · must be present
<script type="module" src="/index.tsx"></script>

Also verify manifest.json is still present and correct.

3

Save to GitHub

Click "Save to GitHub" in AI Studio. Wait for the confirmation message before proceeding.

4

Verify on GitHub (If Unsure)

Open your repo and check index.html. If the script tag is missing, edit the file directly on GitHub, add it back, and commit with: Restore script tag after AI Studio update

5

Wait for Auto-Deploy (1–2 min)

Vercel detects the commit and automatically rebuilds. Monitor progress in your Vercel dashboard. Your installed Android app will reflect the update after a refresh or restart.

Advanced: Git CLI Workflow

bash
# Clone your repo locally
git clone https://github.com/your-username/your-repo.git
cd your-repo

# After AI Studio pushes an update
git pull origin main

# Check and fix index.html if needed, then:
git add index.html
git commit -m "Restore script tag after AI Studio update"
git push origin main
Reference
8 Issues

Troubleshooting

Diagnose and fix the most common deployment issues.

🔴 Problem: App doesn't work
Is the page blank?
YES
Check index.html → add <script> tag
NO
Do AI features fail?
Check Vercel env variables (all 4)
Can't install on Android?
Check manifest.json exists and is valid
✅ Problem resolved — check browser console for other errors
Symptoms
  • App works in AI Studio but shows blank page on Vercel
  • Browser console: "Failed to load resource" errors
Fix
  • Go to GitHub → open index.html → check that <script type="module" src="/index.tsx"></script> is inside <body>
  • If missing, edit on GitHub, add it back, and commit
  • Verify index.tsx or main.tsx exists in the repo root
  • Check Vercel build logs for specific errors
Symptoms
  • App loads but AI features don't work
  • Error messages about API key in browser console
Fix
  • Vercel → Your Project → Settings → Environment Variables
  • Verify all 4 variables: API_KEY, VITE_API_KEY, GEMINI_API_KEY, GOOGLE_GENERATIVE_AI_API_KEY
  • Regenerate API key in AI Studio if needed, update all 4 variables
  • Redeploy: Vercel → Deployments → ⋯ → Redeploy
Common Errors
  • "Cannot find module 'vite'" → ensure package.json includes all dependencies
  • "Build command failed" → build command must be npm run build
  • "Memory limit exceeded" → simplify app or remove large dependencies
Fix
  • Click the failed deployment in Vercel and read the error log carefully
  • Fix the specific error in your GitHub repository and commit — Vercel auto-redeploys
Symptoms
  • No "Install app" prompt appears in Chrome
  • "Add to Home Screen" is grayed out
Fix
  • Verify manifest.json exists in the root of your GitHub repo
  • Confirm index.html has <link rel="manifest" href="/manifest.json">
  • Use Chrome specifically (not other browsers)
  • Check Chrome DevTools → Application → Manifest tab for errors
  • Vercel URL must use HTTPS (it does by default)
Fix
  • Force refresh: open app → pull down to refresh, or close and reopen
  • Clear app cache: Android Settings → Apps → Your App → Storage → Clear Cache
  • Reinstall: uninstall, visit Vercel URL in Chrome, reinstall fresh copy
Fix
Reference

Best Practices & Pro Tips

🔐
Secure Your Keys
Never commit API keys in code. Always use environment variables. Rotate keys periodically. Enable 2FA on all accounts.
🌿
Version Control Wisely
Commit often with descriptive messages. Create branches for major changes. Tag production releases. Keep your commit history clean.
📱
Mobile-First Design
Design for small screens first. Test on real devices, not just emulators. Touch targets must be at least 44×44 px.
Optimize Performance
Minimize large dependencies. Compress images before use. Use lazy loading for heavy components. Monitor Vercel bandwidth.
Accessibility
Use semantic HTML. Ensure sufficient color contrast. Add alt text to all images. Show loading states for AI responses.
📊
Monitor & Maintain
Check Google Cloud Console for API usage. Set billing alerts. Review GitHub security alerts. Update dependencies regularly.

Free Tier Limits

ServiceFree Tier Includes
Google AI StudioFree API access for development and testing — see ai.google.dev/pricing for current limits. No billing setup needed for basic use.
Vercel100 GB bandwidth/month · Unlimited deployments · Automatic HTTPS · Serverless functions
GitHubUnlimited public repositories · 2,000 Actions minutes/month · Private repos with limits
Reference

Glossary & Appendix

API
A way for different software applications to communicate with each other.
API Key
A secret code that authenticates your app to use Google's AI services.
PWA
Progressive Web App — a web app that installs and behaves like a native mobile app.
manifest.json
A JSON file describing your PWA's properties — name, icons, colors, display mode.
Vite
A fast build tool and development server for modern web projects.
React
A JavaScript library for building user interfaces through components.
TypeScript
JavaScript with added type safety — catches bugs before they reach production.
Vercel
A cloud platform for deploying and hosting web apps with zero configuration.
GitHub
Platform for hosting code and collaborating using the Git version control system.
Environment Variable
Secure config settings stored separately from code — used for API keys and secrets.
Standalone Mode
When a PWA opens without browser UI — looks and feels exactly like a native app.
Commit
A saved snapshot of your code changes with a descriptive message in Git.
🎉 Deployment Complete

YOU DID IT.

You now have a production-ready AI application live on the internet and installable on Android. Here's everything you've accomplished:

Gmail, GitHub & Vercel configured
AI-powered app built in AI Studio
Free API key obtained & secured
Critical files configured
Deployed professionally on Vercel
Installed as Android PWA
Update workflow mastered
Immediate
Share & Test
Share your URL with friends and family. Gather real user feedback.
Near Term
Learn React
React + TypeScript enables custom features beyond AI Studio's scope.
Near Term
Add a Database
Firebase or Supabase for user accounts and persistent data.
Future
Play Store
Publish as a TWA (Trusted Web Activity) on the Google Play Store.