Prerequisites
Before you begin, ensure you have the following installed:- Android Studio (latest stable version recommended)
- JDK 11 or higher
- Git for cloning the repository
- Android SDK 26 or higher
The template targets Android API 36 but maintains compatibility with API 26+, ensuring support for approximately 95% of Android devices.
Getting started
Open in Android Studio
Launch Android Studio and select File > Open, then navigate to the cloned directory and open it.
Wait for Android Studio to finish indexing and downloading dependencies. This may take a few minutes on first launch.
Configure your app
Customize the application by editing
After modifying
buildSrc/src/main/java/es/mobiledev/buildsrc/AppConfig.kt:buildSrc/src/main/java/es/mobiledev/buildsrc/AppConfig.kt
Configuration parameters explained
Configuration parameters explained
- applicationId: Your unique application identifier (reverse domain notation)
- namespace: Package namespace for generated resources
- applicationName: Display name shown in the app launcher
- versionCode: Integer version for internal tracking (increment for each release)
- versionName: User-facing version string (e.g., “1.0.0”)
- compileSdkVersion: Android SDK version to compile against
- targetSdkVersion: Android version your app is designed for
- minSdkVersion: Minimum Android version required to run your app
- testRunner: Test instrumentation runner class
AppConfig.kt, sync your project:- Click File > Sync Project with Gradle Files
- Or click the Sync button in the notification bar
Verify your installation
Once the app launches, you should see:- A splash screen (from the launcher feature)
- The home screen with a bottom navigation bar
- Sample articles displayed in a list
Project configuration files
The template uses several key configuration files:settings.gradle.kts
Defines all modules in the project. Located at the root, it includes all feature, data, domain, and shared modules.
gradle.properties
Contains project-wide Gradle settings including JVM memory allocation and AndroidX configuration.
build.gradle.kts
Root build file that defines shared dependencies and configurations across all modules.
AppConfig.kt
Centralized configuration for app identity, versioning, and SDK versions used by all modules.
Common issues and solutions
Build fails with 'AppConfig cannot be resolved'
Build fails with 'AppConfig cannot be resolved'
This occurs when buildSrc hasn’t compiled yet. Solution:
- Clean and rebuild buildSrc:
./gradlew :buildSrc:clean :buildSrc:build - Sync project with Gradle files
- Invalidate caches: File > Invalidate Caches / Restart
Ktlint formatting errors
Ktlint formatting errors
The project enforces Kotlin code style. If builds fail due to formatting:
Dependency resolution fails
Dependency resolution fails
If Gradle can’t resolve dependencies:
- Check your internet connection
- Clear Gradle cache:
rm -rf ~/.gradle/caches/ - Sync project: File > Sync Project with Gradle Files
- Ensure you’re using a compatible Gradle version (check
gradle/wrapper/gradle-wrapper.properties)
Hilt compilation errors
Hilt compilation errors
If you see errors related to Hilt dependency injection:
- Ensure all modules using Hilt have the plugin:
alias(libs.plugins.hilt) - Clean and rebuild:
./gradlew clean build - Check that your Application class is annotated with
@HiltAndroidApp - Verify activities using Hilt are annotated with
@AndroidEntryPoint
Module not found errors
Module not found errors
If Android Studio can’t find project modules:
- Verify the module exists in
settings.gradle.kts - Check that you’re using the correct accessor:
projects.feature.homenotproject(":feature:home") - Enable type-safe project accessors (already enabled in template)
- Sync project with Gradle files
Next steps
Now that you have the template running, explore these resources:Project structure
Learn about the multi-module architecture and how modules interact
Architecture overview
Understand the Clean Architecture principles used in this template
Module organization
Learn about module organization and adding new modules
Navigation
Learn how type-safe navigation works across modules
Development workflow
Here’s a typical development workflow with this template:Additional resources
- Official Android Jetpack Compose Documentation
- Hilt Dependency Injection Guide
- Kotlin Coroutines Documentation
- Android Architecture Components
Need help? Check the GitHub repository for issues, discussions, and updates.