dependencies {
implementation "com.google.android.gms:play-services-base:16.1.0"
implementation "com.google.firbase:firebase-core:17.0.1"
implementation "com.google.firebase:firebase-messaging:19.0.1"
// implementation platform('com.google.firebase:firebase-bom:29.2.0')
implementation fileTree(dir: "libs", include: ["*.jar"])
//noinspection GradleDynamicVersion
implementation "com.facebook.react:react-native: " // From node_modules
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"
debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") {
exclude group:'com.facebook.fbjni'
}
debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {
exclude group:'com.facebook.flipper'
exclude group:'com.squareup.okhttp3', module:'okhttp'
}
debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}") {
exclude group:'com.facebook.flipper'
}
if (enableHermes) {
def hermesPath = "../../node_modules/hermes-engine/android/";
debugImplementation files(hermesPath "hermes-debug.aar")
releaseImplementation files(hermesPath "hermes-release.aar")
} else {
implementation jscFlavor
}
}
want to connect firebase cloud messaging and i got the error Could not find com.google.firbase:firebase-core:17.0.1. when i run the android app.
CodePudding user response:
I think that you forgot the letter e
for firbase
. Replace "com.google.firbase:firebase-core:17.0.1" with "com.google.firebase:firebase-core:17.0.1".
I believe that the firebase-core
has been removed in React Native Firebase, see about the installation of Cloud Messaging on documentation, it doesn't need the firebase-core
and firebase-messaging
.