Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/Niurka77/tf-app/llms.txt

Use this file to discover all available pages before exploring further.

TF-App uses Capacitor to wrap the Vite-compiled web application into a fully native Android app. When you run npx cap add android, Capacitor scaffolds the android/ directory as a standard Gradle project — the same structure you would see in any Android app built with Android Studio. The WebView inside that native shell loads your compiled dist/ assets, giving you native device access while writing only HTML, CSS, and JavaScript.

Prerequisites

Before you can build and run TF-App on Android, make sure the following are installed and configured on your machine:
  • Java JDK 17 — Gradle 8 (used by this project) requires JDK 17 or newer
  • Android Studio Hedgehog (2023.1.1) or newer — includes the Android Emulator and AVD Manager
  • Android SDK Platform 35 — matches compileSdkVersion = 35 and targetSdkVersion = 35 in variables.gradle
  • Android SDK Build-Tools 35.0.0+ — required to compile the app module
  • Node.js 18+ and npm — to run Vite build commands and Capacitor CLI

Installing Android Studio

1

Download Android Studio

Go to developer.android.com/studio and download the latest stable release of Android Studio for your operating system.
2

Run the installer

Launch the installer and follow the setup wizard. When prompted, choose the Standard installation type so the wizard installs the Android SDK, default emulator image, and required components automatically.
3

Install SDK Platform and Build Tools

Open Android Studio → Settings → Languages & Frameworks → Android SDK (or use the SDK Manager icon in the toolbar). Under the SDK Platforms tab, check Android API 35. Under the SDK Tools tab, confirm that Android SDK Build-Tools 35.0.0 or newer is installed. Click Apply to download any missing components.
4

Set the ANDROID_HOME environment variable

Capacitor CLI needs to locate your SDK. Add the following to your shell profile (~/.zshrc, ~/.bashrc, or equivalent):
export ANDROID_HOME=$HOME/Library/Android/sdk          # macOS
# export ANDROID_HOME=$HOME/Android/Sdk                # Linux
export PATH=$PATH:$ANDROID_HOME/emulator
export PATH=$PATH:$ANDROID_HOME/platform-tools
Reload the profile with source ~/.zshrc (or open a new terminal), then verify with:
echo $ANDROID_HOME
adb --version

Opening the Android Project

Once Android Studio is installed and ANDROID_HOME is set, open the android/ directory directly from the terminal using the Capacitor CLI:
npx cap open android
This tells Capacitor to launch Android Studio and load android/ as a Gradle project. You do not need to use File → Open inside Android Studio manually — the CLI handles it. Android Studio will detect settings.gradle, resolve the :app and :capacitor-android modules, and prepare the project for building.

First Build in Android Studio

When Android Studio opens the project for the first time, Gradle automatically syncs and downloads all declared dependencies — including androidx.appcompat, androidx.core:core-splashscreen, and the Capacitor Android bridge. Depending on your internet connection and whether the packages are already in your local Gradle cache, this initial sync can take several minutes. Watch the progress bar in the bottom status bar. Once it reads “Gradle sync finished”, the project is ready. If any dependency resolution errors appear, verify your ANDROID_HOME path and that you have an active internet connection.

Running on a Device or Emulator

You have two options for running TF-App on Android: Physical device
To enable USB debugging on your Android device, go to Settings → About Phone and tap Build Number seven times to unlock Developer Options. Then go to Settings → Developer Options and enable USB Debugging.
Connect your device via USB. Android Studio will detect it in the device dropdown in the toolbar. Select it and click Run ▶. Emulator Open the AVD Manager (Tools → Device Manager) and create a new Android Virtual Device. Choose a device definition (e.g., Pixel 7), select a system image with API 35, and click Finish. Start the emulator, then click Run ▶ in Android Studio. From the terminal As an alternative to Android Studio’s toolbar, you can build and deploy directly from your terminal:
npx cap run android
This command builds the project and installs it on any connected device or running emulator automatically.
The android/ directory is generated and maintained by Capacitor. Avoid making heavy manual edits to generated files like capacitor.build.gradle or capacitor.settings.gradle, as they will be overwritten when you run npx cap sync. Any JavaScript or web asset changes you make in src/ must be compiled and synced before they appear in the Android app — run npm run build && npx cap sync after every relevant change.

Build docs developers (and LLMs) love