Skip to main content
This guide walks you through setting up the Divvy Android app for local development.

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

1

Clone the repo

git clone https://github.com/your-org/divvy.git
cd divvy
2

Open in Android Studio

Launch Android Studio and select Open from the welcome screen, then navigate to the cloned repository root directory.

Configure Environment Variables

Divvy uses Supabase for backend services. You’ll need to configure your local environment with the proper credentials.
1

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.
Never commit local.properties to version control. This file is already in .gitignore and contains sensitive credentials.
2

Add Supabase credentials

Add the following environment variables to local.properties:
SUPABASE_URL=https://xxxx.supabase.co
SUPABASE_ANON_KEY=eyJ...
AUTH_BYPASS=false
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.
3

Configure Supabase Auth

In your Supabase project dashboard:
  1. Navigate to AuthenticationProviders
  2. Enable the Google provider
  3. Add the redirect URL: com.example.divvy://auth
This allows OAuth authentication to work properly in the app.

Environment Variables Explained

VariableDescriptionRequired
SUPABASE_URLYour Supabase project URLYes
SUPABASE_ANON_KEYSupabase anonymous/public API keyYes
AUTH_BYPASSSkip 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

1

Gradle sync

Android Studio should automatically prompt you to sync Gradle. If not, click FileSync 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)
2

Verify configuration

The build system reads local.properties and injects the values as BuildConfig fields:
BuildConfig.SUPABASE_URL
BuildConfig.SUPABASE_ANON_KEY
BuildConfig.AUTH_BYPASS
These are available throughout the app at compile time.

Run the App

Using Android Studio

1

Select run configuration

In the toolbar, ensure the app configuration is selected.
2

Choose a device

Select a physical device or emulator from the device dropdown.
3

Run

Click the green Run button or press Shift + F10 (Windows/Linux) or Control + R (Mac).

Using Command Line

You can also build and install the app via Gradle:
# Build debug APK
./gradlew :app:assembleDebug

# Install on connected device
./gradlew :app:installDebug

# Build and install in one step
./gradlew :app:installDebug
The APK will be generated at:
app/build/outputs/apk/debug/app-debug.apk

Troubleshooting

Gradle Sync Fails

Problem: “Could not resolve all dependencies” Solution:
  • Ensure you have a stable internet connection
  • Check that your local.properties includes the Android SDK path (Android Studio usually adds this automatically)
  • Try FileInvalidate CachesInvalidate and Restart

Build Config Fields Not Found

Problem: BuildConfig.SUPABASE_URL shows as unresolved Solution:
  • Verify local.properties exists in the project root
  • Check that the properties are spelled correctly (case-sensitive)
  • Rebuild the project: BuildRebuild Project

Supabase Connection Errors

Problem: “SupabaseClient not initialised” at runtime Solution:
  • Confirm your SUPABASE_URL and SUPABASE_ANON_KEY are correct
  • Check that the Supabase project is active and not paused
  • Verify network connectivity
  • As a workaround for development, set AUTH_BYPASS=true in local.properties

Authentication Fails

Problem: Google Sign-In doesn’t work Solution:
  • Ensure the redirect URL com.example.divvy://auth is 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
If you encounter persistent issues, reach out to the team on Discord or check existing Linear issues for similar problems.

Next Steps

Now that your environment is set up: