4

I am trying to build react native(0.59.9) android app with firebase push notification(FCM - ^16.2.4). I used this Doc https://github.com/evollu/react-native-fcm! . After add google-service.json file and gradle dependencies , it gave errors.

Task :react-native-fcm:generateDebugBuildConfig FAILED

FAILURE: Build failed with an exception.

What went wrong: Execution failed for task ':react-native-fcm:generateDebugBuildConfig'. Unable to delete directory '.......\node_modules\react-native-fcm\android\build\generated\source\buildConfig\debug\com\evollu\react' after 10 attempts

Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

1 Answer 1

2

I think you are going for a wrong component to install. Of course first delete your current react-native-fcm component. Then it is enough to follow the steps below for installing firebase on react native:

https://rnfirebase.io/docs/v5.x.x/installation/initial-setup

and then continue with this link for configuration of android:

https://rnfirebase.io/docs/v5.x.x/installation/android

Also this link is a very good tutorial:

https://medium.com/@anum.amin/react-native-integrating-push-notifications-using-fcm-349fff071591

Sign up to request clarification or add additional context in comments.

3 Comments

I followed this doc link. But, when i try to add "apply plugin: 'com.google.gms.google-services' ", show errors
@DulajMadushanka: Well, that is another problem and out of this topic. The answer of your current question is the one that I wrote here. If you want, you can ask another question about this error. Because in future when other persons see this question they may puzzle.
Thanks @Reza. I will ask another one.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.