Prerequisites
Before you begin, ensure you have the following tools installed:Install Android Studio
Download and install Android Studio (latest stable version recommended).
Install Java Development Kit (JDK)
Install JDK 8 or higher. Android Studio typically includes a JDK, but you can also install it separately:
- OpenJDK 8+
- Oracle JDK 8+
Install Android SDK components
Using Android Studio’s SDK Manager, install:
- Android SDK Platform 33 (compileSdk)
- Android SDK Build-Tools 26.0.2 or higher
- Android SDK Platform-Tools
- Android SDK Tools
The project requires:
- Minimum SDK: API 21 (Android 5.0)
- Target SDK: API 33 (Android 13)
- Compile SDK: API 33
Clone the repository
Clone the Simple Alarm Clock repository to your local machine:Open the project in Android Studio
Import the project
- Open Android Studio
- Select File > Open
- Navigate to the cloned repository directory
- Select the root directory and click OK
Sync Gradle
Android Studio will automatically start syncing the project with Gradle. If it doesn’t, click File > Sync Project with Gradle Files.The project uses:
- Gradle 7.4.2
- Android Gradle Plugin 7.3.1
Configure local properties
Create alocal.properties file in the root directory if it doesn’t exist:
local.properties
Optional: ACRA email configuration
If you want to configure crash reporting for development builds, add the following to yourlocal.properties:
local.properties
ACRA_EMAIL environment variable.
Verify the setup
To verify your setup is working correctly:- Open the project in Android Studio
- Wait for Gradle sync to complete
- Check that there are no errors in the Build tab
- Try building the project (see Building for details)
Code formatting
The project uses Spotless for code formatting:- Kotlin: ktfmt formatter
- Java: Google Java Format
Next steps
Now that your development environment is set up:- Learn how to build the app
- Explore the testing guide
- Review the contributing guidelines