Sitemap

Member-only story

Configuring Firebase Vertex AI in your Android App

6 min readApr 24, 2025

This tutorial guides you through the process of integrating Firebase Vertex AI SDK into your Android application. By following these steps, you’ll be able to leverage Google’s powerful generative AI models directly within your app.

Check out the repo to look at the code [GitHub repo]. Note: for the code to work you need a Firebase account and configure your google-services.json file.

Demo app:

Prerequisites:

  • An existing Firebase project. If you don’t have one, you can create a new project in the Firebase console.
  • Android Studio installed.
  • A basic understanding of Android development.

Step 1: Update Android app

a. Add Gradle Dependencies

To use the Firebase Vertex AI SDK in your Android project, you need to add the necessary dependencies to your build.gradle files.

  1. Project-level build.gradle.kts:
    Ensure you have the Google Services plugin declared in your plugins block for Kotlin DSL:
plugins {
// … other plugins
id("com.google.gms.google-services") version "4.4.2" apply false // Replace with the latest version
}

--

--

Andres Sandoval
Andres Sandoval

Written by Andres Sandoval

I'm a passionate Android Software Engineer with over 11 years of experience. andresand.github.io/andres-about-me/ buymeacoffee.com/andresand

No responses yet