npm install
Compile and Hot-Reload for Development
npm run dev
-
npm run dev:electron
Type-Check, Compile and Minify for Production
npm run build
-
Either of
-
Android Studio
-
Both of
-
Java(8<= version <= 19, tested on Java 19)
-
Basic Android command-line tools
-
Set ANDROID_HOME
-
Download the command line tools zip from Download Android Studio & App Tools - Android Developers > Command line tools only
-
Unzip it to
"${ANDROID_HOME}/cmdline-tools/latest"
-
Add these tools to PATH
export PATH="${ANDROID_HOME}/cmdline-tools/latest/bin:${PATH}" >> "${HOME}/.profile" source "${HOME}/.profile"
-
Accept the licenses
yes | sdkmanager --licenses
-
-
-
For more details, see Add Capacitor to your web app.
Modify capacitor.config.ts first(optional), and then
npx cap add android
-
Set GRADLE_USER_HOME(optional, defaults to
"${HOME}/.gradle"
) -
Build and Sync the web code to, then Build the native project
# The built apk is located at "release/android/app/build/outputs/apk/debug/app-debug.apk" npm run build:apk
-
Build and Sync the web code to the native project
npm run sync
-
Open Android Studio
npx cap open android
-
Build > Build bundle(s) / APK(s) > Build APK(s)
npm run setUp:electron
# Not save the related packages to package.json
#npm run setUp:noSave:electron
# Build web code and then build Electron app
npm run build:electron
For more scripts, see
npm run