I'm pretty sure that this issue has been resolved before but I didn't find it.
I get this error while compiling: Failed for task :app:processDebugGoogleServices
Image: https://imgur.com/a/VW56f
Sorry if I asked for something answered before and thanks!
Most likely you have included 2 versions of google play services in your gradle files, check for any duplicates and remove the older version.
Also, you can use WIN + SHIFT + S - to screen capture on windows without needing to upload anywhere (goes direct to clipboard), saved me hours ha. 馃樃
Thank for the tip 馃槃
I'm sure that I haven't any duplicate of google play services in my gradle files, but I tried to recompile and now I get another error.
That has any sense?
Can you paste both of your gradle files so I can take a look
This issue about file acces. Deleting android/app/build folder usually solves it for me. Windows and its shenanigans :(
Ok, I tried to delete the android/app/build folder and all seems to work fine but only the first time. When I recompile (without deleting the folder) I get:
as the first time.
I need to delete the build folder every time before run the project?
I guess yes, or try to find the process that locking that folder, its probably java gradle or npm then restart it
I prefer to do a script that deletes that folder 馃槅
but this error shouldn't happen at least in react native 0.47.2 doesn't happen.
Even that script might fail due to admin rights issue. Its about windows OS it has very stupid way to manage user rights on folders
I do not know if it has to do with the previous errors but when I try to create an account with email it throws me this:
I have a file to initialize firebase
import RNFirebase from 'react-native-firebase'
const configurationOptions = { debug: true};
const firebase = RNFirebase.initializeApp(configurationOptions);
export default firebase;
Then I import that
import firebase from '../../services/firebase'
And yes my firebase project has allowed the email/password authentication method.
Why I can't use the auth module?
At this point you should ask on stackoverflow because its not a bug
Anyway, you probably didnt implement google-services.json try to look at https://developers.google.com/android/guides/google-services-plugin
Looks like the original issue has been resolved, so I'm closing this issue. Please shout if this isn't the case.
@comycos Did you ever resolve this issue without having to delete the build folder every time? I got the same problem here.
@xanderberkein Yes, I just update react-native and move the whole project to another directory to avoid problems with directory length.
Should change your windows property settings of the files in the folder.
*Ensure the Read-only check-box in unchecked. then click apply.
@NiCRoZi but you have to do this everytime, am I right? if so there is no permanent solution to this issue yet, is there?
@Apak00 yes. I havent found any solution this far. I do gradlew clean everytime in android before i run react-native run-android
@NickyMwangi I might have found a solution, I'm not sure but try adding your buildToolsVersion back. Like so, I added buildToolsVersion "26.0.0"
to my app level build.gradle
file.
@Apak00 thanks your solution work for me . yes this is the issue with buitdToolsVersion try to track back on it. For me it's working properly on _buildToolsVersion "25.0.3"_ on buildToolsVersion "26.0.0" it is still creating issue some time
I had my terminal opened with packager already running (npm start). I terminated the packager and run from the android studio and I didn't get that error then.
This is about Windows file access. Try restarting the computer, it always worked for me. For some reason, windows blocks these file access.
I still encounter this issue regularly on Windows. I always have to do run-android
twice so things shake out in the right order and it's very frustrating.
Hello, is it possible that this error occurs whenever you're experiencing internet connection issues?
I reckon that this configuratin in the buid.gradle has something to do:
implementation 'com.google.android.gms:play-services-base:+'
implementation 'com.google.android.gms:play-services-maps:+'
Certainly not, it happens every single time. I'm pretty sure there's some kind of race condition in Windows environments where a file is written to and deleted at the same time before it's released.
For me, the issue caused by the Linux Subsystem (I have run some jobs for this project from the subsystem and some from Windows). As a result, I had to run chmod from the subsystem (Ubuntu app in my case ), and it did the trick for me. Hope it helps.
This issue constantly happens to me. I can close my project at the end of the day working, open it the following morning and it'll crash with the Execution failed for task ':app:processDebugGoogleServices'
error straight away. Seems like a poor flaw with so many issues over the internet of it, with the only 'solution' being to either restarting windows, keep rebuilding the project with hope, or run the usual cd android && ./gradlew clean
@JavierYepez Did you create a new project and added the google-json.services of another project and added the SHA1 of the new project in that another project's Firebase console?
run as Administrator in CMD & run the project, it's gonna be Ok for me.
run as Administrator in CMD & run the project, it's gonna be Ok for me.
it's work for me :D
This issue constantly happens to me. I can close my project at the end of the day working, open it the following morning and it'll crash with the
Execution failed for task ':app:processDebugGoogleServices'
error straight away. Seems like a poor flaw with so many issues over the internet of it, with the only 'solution' being to either restarting windows, keep rebuilding the project with hope, or run the usualcd android && ./gradlew clean
it worked )
Ok, I tried to delete the android/app/build folder and all seems to work fine but only the first time. When I recompile (without deleting the folder) I get:
as the first time.I need to delete the build folder every time before run the project?
I just manually created a debug directory in google-services and it solved the issue for me
Most helpful comment
This issue about file acces. Deleting android/app/build folder usually solves it for me. Windows and its shenanigans :(