If you are trying to develop Android app using React Native then chances are high that you come across Execution failed for task ‘:app:processDebugGoogleServices’ error. You may wonder what went wrong with your project. No worries, we have a solution for this react native issue.
The error usually occurs when you make any native changes to your Android project. This error is always accompanied with the following message:
Failed to delete: F:\yourproject\android\app\build\generated\res\google-services\debug
When you face this Android specific React Native error, all you need to do is gradle clean. This can be done with the following command:
cd android && gradlew clean
Through the above command you will be navigated to android folder and gradle clean will be executed.
After that, just navigate back to project folder and rebuild your react native project using the following command
cd.. && react-native run-android
The error gets fixed with this but that doesn’t mean the error wouldn’t appear again. When the error reappears follow the above steps again to fix the error.