This document provides instructions for agents and automated systems to work with this repository.
The project has been upgraded to a modern Android build environment. Strict adherence to these versions is required to ensure a successful build.
- Version: Java 21 is mandatory.
- Installation:
sudo apt-get update && sudo apt-get install -y openjdk-21-jdk - Verification: Ensure Java 21 is the default version:
java -version
compileSdk: 36targetSdk: 36minSdk: 21buildToolsVersion: The Android Gradle Plugin will automatically download the required version. Ensure theANDROID_HOMEenvironment variable is correctly set to your SDK location.
- Gradle Version: 9.2.1
- Android Gradle Plugin (AGP) Version: 8.9.1
- Kotlin Version: 2.3.0
- The Gradle wrapper (
./gradlew) is included in the repository and should be used for all build commands. It will automatically download the correct Gradle version.
- Clean the project:
./gradlew clean
- Build a debug APK:
./gradlew assembleDebug
- Run unit tests:
./gradlew test
During the build process, you may encounter Permission denied errors related to the .gradle or .kotlin directories in the project root. This is often due to file ownership issues within the sandbox environment.
Solution:
Before running a build, ensure the current user owns these directories by running the following commands from the repository root:
sudo chown -R $(whoami) .gradle/
sudo chown -R $(whoami) .kotlin/If the build fails with an error related to deleting the app/build directory, you may need to remove it manually with sudo:
sudo rm -rf app/buildIf the build fails with "cannot find symbol" errors related to the R class (e.g., R.attr.colorPrimary), it signifies that the Android resource processor failed. This is almost always a symptom of another underlying issue.
Do not attempt to fix R class errors directly. Instead, look for other compilation errors in the build log. Fixing those will typically resolve the R class generation problem. If there are no other errors, the cause is likely a misconfiguration in the app/build.gradle file's dependencies.