Docs · Local builds

Build locally with the Capacitor CLI

Prefer to compile on your own machine? Here's the exact flow Web2APK runs for you, that you can run yourself.

Prerequisites

  • Node.js 20+
  • JDK 17 (Temurin/OpenJDK)
  • Android SDK 34 + build-tools 34 (Android Studio or cmdline-tools)
  • ANDROID_SDK_ROOT and JAVA_HOME set

1 · Wrap your web app

From your project folder (the one that builds to dist/build/out):

npm install @capacitor/core @capacitor/cli @capacitor/android
npx cap init "Zikr Reminder" "com.you.zikr" --web-dir=dist
npm run build            # produce your static web output
npx cap add android
npx cap sync android

2 · Icons & splash

Drop a 1024×1024 assets/icon.png (and optional assets/splash.png), then generate every density:

npm install -D @capacitor/assets
npx @capacitor/assets generate --android

3 · Build & sign

cd android
./gradlew assembleRelease bundleRelease
# Sign (or let Android Studio manage a keystore):
keytool -genkeypair -v -keystore release.keystore -alias app \
  -keyalg RSA -keysize 2048 -validity 10000
apksigner sign --ks release.keystore --out app-release-signed.apk \
  app/build/outputs/apk/release/app-release-unsigned.apk

Output: app-release-signed.apk (install on device) and app-release.aab (upload to Google Play).

Tip: Web2APK runs exactly this pipeline in the cloud so you don't need any of the above — just upload a ZIP or connect a repo and download the signed APK.