Comments (7)
There is no reason to have direct firebase dependencies in your app level build.gradle, and certainly not with outdated versions.
Auto linking will bring those dependencies in for you from the react-native-firebase modules.
If you must depend on them directly for some project-specific reason (like you have custom native code on Android that uses firebase native apis directly...), remove the bom one, just depend on the specific modules you need and do not specify a version
from react-native-firebase.
just check your project level build.gradle file and remove extra thing which on is not used...
my android/build.gradle file souce code..........******************
buildscript {
ext {
buildToolsVersion = "33.0.0"
minSdkVersion = 21
compileSdkVersion = 33
targetSdkVersion = 33
kotlinVersion = "1.8.0"
// googlePlayServicesVersion = "+"
// firebaseMessagingVersion = "+"
// We use NDK 23 which has both M1 support and is the side-by-side NDK version from AGP.
ndkVersion = "23.1.7779620"
}
repositories {
google()
mavenCentral()
maven { url 'https://maven.google.com' }
maven { url "https://www.jitpack.io" }
}
dependencies {
classpath("com.android.tools.build:gradle:7.3.1")
classpath("com.facebook.react:react-native-gradle-plugin")
classpath('com.google.gms:google-services:4.3.15')
}
}
and android/app/build.gradle file like this......***************
apply plugin: "com.android.application"
apply plugin: "com.facebook.react"
apply from: project(':react-native-config').projectDir.getPath() + "/dotenv.gradle"
apply plugin: 'com.google.gms.google-services'
import com.android.build.OutputFile
/**
-
This is the configuration block to customize your React Native Android app.
-
By default you don't need to apply any configuration, just uncomment the lines you need.
*/
react {
...........// The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map"
// hermesFlags = ["-O", "-output-source-map"]
}
/**
- Set this to true to create four separate APKs instead of one,
- one for each native architecture. This is useful if you don't
- use App Bundles (https://developer.android.com/guide/app-bundle/)
- and want to have separate APKs to upload to the Play Store.
*/
def enableSeparateBuildPerCPUArchitecture = false
/**
- Set this to true to Run Proguard on Release builds to minify the Java bytecode.
*/
def enableProguardInReleaseBuilds = false
/**
- The preferred build flavor of JavaScriptCore (JSC)
- For example, to use the international variant, you can use:
def jscFlavor = 'org.webkit:android-jsc-intl:+'
- The international variant includes ICU i18n library and necessary data
- allowing to use e.g.
Date.toLocaleString
andString.localeCompare
that - give correct results when using with locales other than en-US. Note that
- this variant is about 6MiB larger per architecture than default.
*/
def jscFlavor = 'org.webkit:android-jsc:+'
/**
- Private function to get the list of Native Architectures you want to build.
- This reads the value from reactNativeArchitectures in your gradle.properties
- file and works together with the --active-arch-only flag of react-native run-android.
*/
def reactNativeArchitectures() {
def value = project.getProperties().get("reactNativeArchitectures")
return value ? value.split(",") : ["armeabi-v7a", "x86", "x86_64", "arm64-v8a"]
}
android {
packagingOptions {
pickFirst 'lib/x86/libc++_shared.so'
pickFirst 'lib/x86_64/libjsc.so'
pickFirst 'lib/arm64-v8a/libjsc.so'
pickFirst 'lib/arm64-v8a/libc++_shared.so'
pickFirst 'lib/x86_64/libc++_shared.so'
pickFirst 'lib/armeabi-v7a/libc++_shared.so'
}
ndkVersion rootProject.ext.ndkVersion
buildToolsVersion rootProject.ext.buildToolsVersion
compileSdkVersion rootProject.ext.compileSdkVersion
namespace "YOUR_PACKAGE_NAME"
defaultConfig {
applicationId "NAME"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 4
versionName "1.3"
vectorDrawables.useSupportLibrary = true
}
splits {
abi {
reset()
enable enableSeparateBuildPerCPUArchitecture
universalApk false // If true, also generate a universal APK
include (*reactNativeArchitectures())
}
}
signingConfigs {
debug {
storeFile file('debug.keystore')
storePassword 'android'
keyAlias 'androiddebugkey'
keyPassword 'android'
}
}
buildTypes {
debug {
signingConfig signingConfigs.debug
}
release {
// Caution! In production, you need to generate your own keystore file.
// see https://reactnative.dev/docs/signed-apk-android.
signingConfig signingConfigs.debug
minifyEnabled enableProguardInReleaseBuilds
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
}
}
buildFeatures {
viewBinding true
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
// applicationVariants are e.g. debug, release
applicationVariants.all { variant ->
variant.outputs.each { output ->
// For each separate APK per architecture, set a unique version code as described here:
// https://developer.android.com/studio/build/configure-apk-splits.html
// Example: versionCode 1 will generate 1001 for armeabi-v7a, 1002 for x86, etc.
def versionCodes = ["armeabi-v7a": 1, "x86": 2, "arm64-v8a": 3, "x86_64": 4]
def abi = output.getFilter(OutputFile.ABI)
if (abi != null) { // null for the universal-debug, universal-release variants
output.versionCodeOverride =
defaultConfig.versionCode * 1000 + versionCodes.get(abi)
}
}
}
}
dependencies {
// The version of react-native is set by the React Native Gradle Plugin
implementation("com.facebook.react:react-android")
implementation("androidx.swiperefreshlayout:swiperefreshlayout:1.0.0")
implementation("androidx.core:core-splashscreen:1.0.0")
implementation ('com.google.firebase:firebase-bom:32.7.2')
debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}")
debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {
exclude group:'com.squareup.okhttp3', module:'okhttp'
}
debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}")
if (hermesEnabled.toBoolean()) {
implementation("com.facebook.react:hermes-android")
} else {
implementation jscFlavor
}
}
apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
from react-native-firebase.
facing same issue..
did you find any solution @ailtonaires
I removed the line below and it worked for me:
//firebaseMessagingVersion = "+"
from react-native-firebase.
facing same issue..
did you find any solution @ailtonaires
from react-native-firebase.
facing same issue..
from react-native-firebase.
and android/app/build.gradle. remove :+ implementation "com.facebook.react:react-native:+" => implementation "com.facebook.react:react-native" work for me π
from react-native-firebase.
Related Issues (20)
- :fire: You need to update react-native-firebase to get new firebase-ios-sdk that complies with App Store Privacy Manifest requirements HOT 8
- Firestore encountered gRPC-C++ error while upgrading Firebase module to 19.2(iOS) HOT 3
- [π] Documentation Issue - site was down, it is back up HOT 1
- [π₯] Fastlane (iOS) error during compile error on this library HOT 3
- :app debug:x86 failed to configure C/C++ Failed C/C++ configuration. java.lang.IllegalStateException: Failed C/C++ configuration. HOT 3
- [π] AppCheck usage sky rockets after update HOT 2
- [π] Invariant Violation: `new NativeEventEmitter()` requires a non-null argument. HOT 1
- [π] π₯ @react-native-firebase/messaging (Android) - Messaging() gets the wrong ReactContext when there is another Activity instantiated by ReactInstanceManager? HOT 10
- π₯Can't able to run react native android app with @react-native-firebase/perf": "19.1.0 and above HOT 1
- iOS Data Only FCM messages not reaching device HOT 3
- On iOS onMessage event is not firing in Foreground HOT 13
- [π] pod install issue after added library HOT 2
- [π] FirebaseCoreInternal/FirebaseCoreInternal.modulemap' not found after XCode required to download iOS 17.2 HOT 6
- [π] π₯ remote config method `fetchAndActivate()` inconsistent with method `fetch()` and then `activate()` on iOS only
- [π] Bug Report Title - java.lang.RuntimeException: Could not invoke RNFBFirestoreDocumentModule.documentOnSnapshot only android HOT 1
- [π] CocoaPods could not find compatible versions for pod "Firebase/Messaging" HOT 2
- [π] 'FlipperKit/FlipperClient.h' file not found HOT 3
- [π] Bug Report Title - auth()?.currentUser.getIdToken(true) returns null to different users (80% on iOS)
- [π] [email protected] support? HOT 24
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native-firebase.