Prerequisites
Before you begin, ensure you have the following installed:- Android Studio (latest stable version recommended)
- JDK 8 or higher (JDK 11+ recommended)
- Git for version control
- Android SDK with API Level 26-36
- A physical Android device or emulator running Android 8.0 (API 26) or higher
Divvy targets Android SDK 36 (compileSdk) with a minimum SDK of 26. Make sure your Android Studio SDK Manager has these API levels installed.
Clone the Repository
Configure Environment Variables
Divvy uses Supabase for backend services. You’ll need to configure your local environment with the proper credentials.Create local.properties file
In the project root directory (same level as
build.gradle.kts), create a file named local.properties if it doesn’t already exist.Add Supabase credentials
Add the following environment variables to
local.properties:Need credentials? Contact @vivekbw or any team member asynchronously to get the Supabase URL and anon key. See the team members list in the README.
Environment Variables Explained
| Variable | Description | Required |
|---|---|---|
SUPABASE_URL | Your Supabase project URL | Yes |
SUPABASE_ANON_KEY | Supabase anonymous/public API key | Yes |
AUTH_BYPASS | Skip authentication (use true for testing without Supabase) | No (defaults to false) |
The
AUTH_BYPASS flag is useful for UI development when you don’t have Supabase credentials. Set it to true to use a dummy account defined in app/src/main/java/com/example/divvy/ui/auth/DummyAccount.kt.Sync and Build
Gradle sync
Android Studio should automatically prompt you to sync Gradle. If not, click File → Sync Project with Gradle Files.Wait for the sync to complete. This will download all dependencies including:
- Jetpack Compose libraries
- Supabase Kotlin SDK
- Hilt (dependency injection)
- CameraX (for receipt scanning)
Run the App
Using Android Studio
Using Command Line
You can also build and install the app via Gradle:Troubleshooting
Gradle Sync Fails
Problem: “Could not resolve all dependencies” Solution:- Ensure you have a stable internet connection
- Check that your
local.propertiesincludes the Android SDK path (Android Studio usually adds this automatically) - Try File → Invalidate Caches → Invalidate and Restart
Build Config Fields Not Found
Problem:BuildConfig.SUPABASE_URL shows as unresolved
Solution:
- Verify
local.propertiesexists in the project root - Check that the properties are spelled correctly (case-sensitive)
- Rebuild the project: Build → Rebuild Project
Supabase Connection Errors
Problem: “SupabaseClient not initialised” at runtime Solution:- Confirm your
SUPABASE_URLandSUPABASE_ANON_KEYare correct - Check that the Supabase project is active and not paused
- Verify network connectivity
- As a workaround for development, set
AUTH_BYPASS=trueinlocal.properties
Authentication Fails
Problem: Google Sign-In doesn’t work Solution:- Ensure the redirect URL
com.example.divvy://authis added in Supabase Auth settings - Check that the Google provider is enabled in Supabase
- Verify your device/emulator has Google Play Services installed
Camera Permission Issues
Problem: Receipt scanning crashes or doesn’t request camera permission Solution:- Check that your device/emulator grants camera permissions
- For emulators, enable camera in AVD settings
- Reinstall the app to trigger permission dialogs again
Next Steps
Now that your environment is set up:- Learn about the Development Workflow
- Explore the Testing Guide
- Review the team contract