DEV Community

princekauz
princekauz

Posted on

How to Build a Flutter APK Without Android Studio (or Any Local SDK)

Building a Flutter APK without Android Studio is the single most common wall new Flutter developers hit. Android Studio is a multi-gigabyte install that wants to own your machine, and GitHub's free CI minutes die on the first Gradle cache miss if you don't configure them perfectly. There is a shorter path, and after running it end-to-end dozens of times, here is the honest guide.

Why this is even a problem

  • Android Studio bundles the SDK, emulator images, platform tools and IntelliJ — 8–12 GB before your first flutter run
  • FlutterFlow's free tier doesn't let you export an APK at all (it's behind the $39/mo Basic plan)
  • Old projects rot: Gradle 7-era code dies on modern AGP with cryptic Your project requires a newer version of the Kotlin Gradle plugin errors
  • GitHub Actions free tier can do it, but you'll burn an evening writing YAML and downloading SDKs on every cold run

Option 1: Minimal local toolchain (no Android Studio)

If you want to stay local but skip the IDE:

# 1. Install Flutter (this includes the Dart SDK)
git clone https://github.com/flutter/flutter.git -b stable && export PATH="$PATH:`pwd`/flutter/bin"

# 2. Install ONLY the command-line Android tools
sdkmanager "platform-tools" "platforms;android-36" "build-tools;36.0.0"

# 3. Accept licenses (the step everyone forgets)
yes | sdkmanager --licenses

# 4. Build
flutter build apk --release
Enter fullscreen mode Exit fullscreen mode

Works. But you still downloaded ~2 GB of SDK, and the first build still takes 10+ minutes on a laptop. If your machine is a Chromebook, a locked-down corporate box, or a potato — read on.

Option 2: Remote build services

The idea is simple: your project goes up, a machine with the full toolchain builds it, an APK comes back.

I run one of these (a free-tier service at flutter-apk-builder) — here's the whole flow as an API:

# import your project (any Flutter project zip)
curl -X POST https://princekauz-flutter-apk-builder.hf.space/api/projects/import \
  -F "file=@my-app.zip"# kick off a release build
curl -X POST "https://princekauz-flutter-apk-builder.hf.space/api/project/my-app/build?mode=full"

# poll, then download the signed APK
curl -o my-app-release.apk "https://princekauz-flutter-apk-builder.hf.space/api/download/my-app/full"
Enter fullscreen mode Exit fullscreen mode

Modes: full (universal APK), split (per-ABI APKs — smaller downloads), appbundle (AAB for Play Store).

The toolchain underneath is Gradle 9.x / AGP 9.x / Kotlin 2.x with a compileSdk 36 override registered before dependency evaluation — which, incidentally, is the fix for most "my project stopped building" errors from the last two years of Flutter/Gradle drift.

When a remote build makes sense:

  • You're on a Chromebook / weak machine / phone-only setup
  • You need one APK from a FlutterFlow or AI-builder project and don't want a $39/mo plan
  • Your old project needs the version surgery described above (this is the "legacy rescue" case)
  • You want builds inside an automation without maintaining CI

Option 3: Do it in CI (the middle path)

If your project is already on GitHub, a minimal Actions workflow gets you there — but respect the gotchas:

  • Cache ~/.gradle and the Flutter pub cache or cold builds take 15+ min
  • Pin your Java/Gradle versions; don't trust defaults
  • Play Store wants an AAB (flutter build appbundle), not an APK

It's free at low volume and worth learning. But if you just need the APK today, options 1 and 2 are faster to a working artifact.

Signing: the part everyone forgets

A release APK you'll distribute outside Play Store should be signed with your own keystore:

keytool -genkey -v -keystore ~/my-release-key.jks -keyalg RSA -keysize 2048 -validity 10000 -alias my-alias
Enter fullscreen mode Exit fullscreen mode

Keep that file. Losing it means you can never update that app (Play Store identity is keystore-bound). If you lost a keystore — that's a rescue job, not a rebuild.

The honest summary

Path Setup cost Time to APK Best for
Minimal local SDK ~2 GB, 30 min 10+ min first build Long-term Flutter work
Remote build API zero ~4–8 min One-off builds, weak machines, automation
GitHub Actions YAML + cache tuning 8–20 min/cold run Teams, repeatable pipelines

Whatever you pick: flutter build is a solved problem, and none of these paths should cost you an evening anymore.


We run a small remote build service on top of this toolchain — first build is free to verify quality, then $12 a build or $79 for a 10-pack, payable by card or crypto. Details at kauz-labs.pages.dev or email contact.eventify.app@gmail.com. Questions about a specific build error? Ask in the comments — I answer all of them.

Top comments (0)