Coding⏱️ 2 min read📅 2026-05-31

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

Quick Answer: Try removing the line apply plugin 'com.google.gms.google-services' and then add it back if you still encounter issues, or consider using a different Firebase configuration method.

The issue you're experiencing is due to the conflicting requirements of using Firebase and Google's Gradle plugin. The error message indicates that the task ':app:mapDebugSourceSetPaths' failed, which is caused by the incorrect configuration of the 'extraGeneratedResDir' property.

⚠️ Common Causes

  • Incorrectly configured Firebase plugin or Google's Gradle plugin.

🚀 How to Resolve This Issue

Method 1: Disable Firebase Plugin

  1. Step 1: Remove the 'apply plugin: 'com.google.gms.google-services'' line from your build.gradle file.

Method 2: Configure Firebase Plugin Correctly

  1. Step 1: Add the 'apply plugin: 'com.google.gms.google-services'' line back to your build.gradle file, but also add the 'configurations {defaultConfig { generatedResDir = 'gen/res/' }}' block.

💡 Conclusion

By following these methods, you should be able to resolve the issue and successfully use Firebase with your Android project.

Did this fix your problem?

If not, try searching for specific error codes.

🔍 Search Error Database

❓ Frequently Asked Questions