Skip to content

Android build error (Firebase)Android: “Execution failed for task ‘:app:mapDebugSourceSetPaths’” (extraGeneratedResDir)

A debug build stops with Execution failed for task :app:mapDebugSourceSetPaths, followed by Error while evaluating property extraGeneratedResDir. It appears after upgrading the Android Gradle plugin, or Flutter, while the project still uses an old google-services plugin (4.3.13 or earlier is the usual culprit) from an older Firebase setup.

Short answer

Raise the com.google.gms.google-services plugin version to the one in Firebase’s Android setup guide (4.3.14 or later). In a Flutter app that line is in android/settings.gradle(.kts); in older projects it is a classpath line in android/build.gradle. Then run flutter clean (or ./gradlew clean) and build again.

Why the task fails, and the fix

  1. 01

    An old google-services plugin with a newer Android Gradle plugin

    “google-services plugin 4.3.14 Improved task caching and awareness of changes in google-services.json files.” Firebase, Firebase Android release notes

    An old plugin, 4.3.13 or earlier, often triggers it on newer Android Gradle plugin releases, and developers report the error going away on 4.3.14 or later, whose release notes mention improved task caching. Use the version in Firebase’s setup guide (4.5.0 on November 8, 2026). Change only the version number and keep apply false.

    // android/settings.gradle.kts (Flutter)
    plugins {
        id("com.google.gms.google-services") version "4.5.0" apply false
    }
    
    // or android/build.gradle (older buildscript style)
    // classpath 'com.google.gms:google-services:4.5.0'
  2. 02

    The version is set in a place you didn’t change

    “In your root-level (project-level) Gradle file (<project>/build.gradle.kts or <project>/build.gradle), add the Google services Gradle plugin as a dependency:” Firebase, Add Firebase to your Android project

    Projects that went through several Flutter templates can declare the plugin twice: a classpath in android/build.gradle and a plugins line in android/settings.gradle. Search both and keep one, at the current version.

    grep -rn "google-services" android/*.gradle* android/app/build.gradle*
  3. 03

    Old build output after the version change

    Gradle can keep failing on cached task output from the old plugin. Clean once, then build.

    flutter clean
    flutter pub get
    flutter run
    
    # native Android
    ./gradlew clean assembleDebug

Checked against the vendor’s docs on : Firebase: Add Firebase to your Android project; Firebase Android release notes (google-services plugin).

Rather hand it over?

Fixed scope, fixed price, paid upfront. The work happens in writing; no call needed.

Related: Firebase “google-services” plugin not found · Gradle “Could not resolve all files” · Android “SDK location not found” · Firebase auth/network-request-failed

Questions

More on this error

Which version should I use?

The one shown in Firebase’s Android setup guide at the time you upgrade. Any release from 4.3.14 on fixes this task; newer ones also support current Android Gradle plugin versions.

The error mentions processDebugGoogleServices instead. Is that the same?

If the message says Querying the mapped value of provider(java.util.Set) before task :app:processDebugGoogleServices has completed is not supported, it is this same error: update the plugin. If processDebugGoogleServices itself fails, google-services.json is missing or its package name doesn’t match applicationId; put the file in android/app and check the name.

Can you fix it for me?

If one bug is the whole problem, the App Fix Ticket covers it: a written diagnosis first, then the fix. If the app has more going on, the Launch Check is a written check of the whole app. Each issue found is rated critical, high, medium or low, with where it is and how it was confirmed. No issues worth fixing, no charge. If the Launch Check finds nothing rated medium or higher, Simon refunds the full $450. You keep the report either way. This applies to the first 10 Launch Checks bought after October 30, 2026.

A different error?

Describe it and get a written quote

Send the error and what you were doing. You get a written scope, a fixed price and a timeline; Simon replies by email, usually within one business day.