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.

Community
  • 1
  • 1
Dulaj Madusanka
  • 308
  • 2
  • 17

1 Answers1

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

Saeid
  • 1,996
  • 4
  • 27
  • 44
  • I followed this doc [link](https://medium.com/@anum.amin/react-native-integrating-push-notifications-using-fcm-349fff071591). But, when i try to add "apply plugin: 'com.google.gms.google-services' ", show errors – Dulaj Madusanka Aug 20 '19 at 07:35
  • 1
    @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. – Saeid Aug 20 '19 at 07:41
  • Thanks @Reza. I will ask another one. – Dulaj Madusanka Aug 20 '19 at 07:54