'Execution failed for task ':app:mapDebugSourceSetPaths'. > Error while evaluating property 'extraGeneratedResDir' of task

I've checked this answer: https://stackoverflow.com/a/34834772/13519865

It tells us to remove this line

apply plugin: 'com.google.gms.google-services'

Removing the line as asked completes the build, but I can't use Firebase (ofc!), it caused a new error, which tells me to add the line: https://stackoverflow.com/a/40085096/13519865

So, I'm stuck in a loop here. Related code sample added here https://github.com/Cyberavater/A.Reader



Solution 1:[1]

According to the new Chipmunk update of Android Studio, if you need to use Google Services, you have to add the following lines of code inside your build.gradle (Project) file:

plugins {
    id 'com.android.application' version '7.2.0' apply false
    id 'com.android.library' version '7.2.0' apply false
    id 'com.google.gms.google-services' version '4.3.10' apply false ?
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

And inside your build.gradle (Module) file, the following plugin IDs:

plugins {
    id 'com.android.application'
    id 'com.google.gms.google-services' ?
}

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Alex Mamo