React-native-fcm: [Android] Build failed ':react-native-fcm' could not be found

Created on 18 Aug 2016  Â·  8Comments  Â·  Source: evollu/react-native-fcm

I'm unable to add react-native-fcm, react-native-firebase-analytics, react-native-firebase-crash-report to my app. iOS is fine but on Android I receive the following error:

* Where:
Build file '/Users/ferdinandvonhagen/GoStudentDev/mobile-app/android/app/build.gradle' line: 131

* What went wrong:
A problem occurred evaluating project ':app'.
> Project with path ':react-native-fcm' could not be found in project ':app'.

I followed the steps from the README.md. My React Native version is 0.30.0.

Anybody an idea how to solve this issue?

Most helpful comment

For me, it was because I missed this step:

Edit android/app/settings.gradle
...

  • include ':react-native-fcm'
  • project(':react-native-fcm').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-fcm/android')
    include ':app'

All 8 comments

Line 131 is just: compile project(':react-native-fcm')

dependencies {
    compile project(':react-native-fcm')
    compile project(':react-native-firebase-analytics')
    compile project(':react-native-vector-icons')
    compile fileTree(dir: "libs", include: ["*.jar"])
    compile "com.android.support:appcompat-v7:23.0.1"
    compile "com.facebook.react:react-native:+"  // From node_modules
    compile project(':react-native-code-push')
    compile project(':react-native-firebase-crash-report')
}

Issue with not installing the Google Repository correctly

@FerdinandvHagen i'm having the exact same problem
i.e.

A problem occurred evaluating project ':app'.
> Project with path ':react-native-fcm' could not be found in project ':app'.

though it looks like my Google Repository is installed correctly
image

what kind of issues did you have and how did you fix them?
thanks in advance

i am having the exact same issue not fixed yet.....

i followed the exact same way in the documentation, and installed google sdks,

Uploading Screenshot from 2017-05-20 12-56-10.png…

For me, it was because I missed this step:

Edit android/app/settings.gradle
...

  • include ':react-native-fcm'
  • project(':react-native-fcm').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-fcm/android')
    include ':app'

@cubabit Thanks !!! its fixed....

Thank you!!! Same problem with self installation of react-native-firebase...

Was this page helpful?
0 / 5 - 0 ratings