Prerequisites
Before building MiTensión, ensure you have the following installed:Android Studio
Download and install Android Studio (latest stable version recommended).
Android SDK
Ensure you have Android SDK installed with the following components:
- Android SDK Platform 36
- Android SDK Build-Tools
- Android SDK Platform-Tools
Clone the Repository
Clone the MiTensión source code from your repository:Replace
<repository-url> with the actual URL of the MiTensión repository.Project Configuration
The project uses Gradle with Kotlin DSL for build configuration. Here are the key specifications: Build Configuration (app/build.gradle.kts):
- Kotlin: 1.9.23
- KSP (Kotlin Symbol Processing): 1.9.23-1.0.19
- Compose Compiler: 1.5.11
Build the App
You can build the app using either Android Studio or the command line.- Using Android Studio
- Using Command Line
Open the Project
- Launch Android Studio
- Select File > Open
- Navigate to the cloned
MiTensiondirectory - Click OK to open the project
Sync Gradle
Android Studio will automatically sync Gradle dependencies. If not:
- Click File > Sync Project with Gradle Files
- Wait for the sync to complete
Build APK
To build a debug APK:
- Select Build > Build Bundle(s) / APK(s) > Build APK(s)
- Wait for the build to complete
- Click locate in the notification to find the APK
Install the App
Once the APK is built, install it on your Android device.Enable Developer Options
On your Android device:
- Go to Settings > About phone
- Tap Build number 7 times to enable Developer Options
- Go back to Settings > System > Developer options
- Enable USB debugging
Connect Your Device
Connect your Android device to your computer via USB.You should see your device listed.
Install APK
Install the APK using ADB:Or from Android Studio:
- Select your device from the device dropdown
- Click the Run button (green triangle)
Alternative Installation Methods
Install via File Transfer
Install via File Transfer
If you don’t have USB debugging enabled:
- Copy the APK file to your device (via email, cloud storage, etc.)
- On your device, locate the APK file
- Tap the APK to install
- You may need to enable Install from Unknown Sources in Settings
Install on Emulator
Install on Emulator
To test on an Android emulator:
- Open AVD Manager in Android Studio
- Create a virtual device with API level 31 or higher
- Start the emulator
- Run the app from Android Studio or use:
Verify Installation
After installation, verify that MiTensión is working correctly:Check Initial Screen
You should see the measurement screen showing:
- Current time period (Morning, Afternoon, or Night)
- Measurement counter (Measurement 1/3)
- Two input fields for systolic and diastolic values
- Save and View Calendar buttons
Troubleshooting
Build fails with 'SDK not found'
Build fails with 'SDK not found'
Ensure Android SDK is properly installed:
- Open Android Studio
- Go to Tools > SDK Manager
- Install Android SDK Platform 36
- Set
ANDROID_HOMEenvironment variable
App crashes on launch
App crashes on launch
Verify your device meets the minimum requirements:
- Android 12 (API 31) or higher
- Check logcat for error messages:
Cannot install APK on device
Cannot install APK on device
- Ensure USB debugging is enabled
- Check device is properly connected:
adb devices - Uninstall previous versions:
adb uninstall com.fxn.mitension - Enable “Install from Unknown Sources” if installing manually
Gradle sync fails
Gradle sync fails
- Check your internet connection
- Clear Gradle cache:
- Verify Kotlin version 1.9.23 is properly configured
Project Structure
Here’s an overview of the MiTensión project structure:Next Steps
Quick Start Guide
Learn how to use MiTensión to record and track your blood pressure
Introduction
Learn more about MiTensión’s features and technology stack