Abdullah Mujahid
Abdullah Mujahid

Reputation: 917

React Native Firebase Auth keeps on failing I have followed all the necessary steps

So I have downloaded react-native-firebase using npm i @react-native-firebase/auth and it is sucessfully registered in my package.json file. I have added the google-services plugin to my android directory as directed by the website. Directory

Than after that I have added this line in /android/build.gradle

 classpath 'com.google.gms:google-services:4.3.4'

Than after that I have added the plugin to in /android/app/build.gradle

apply plugin: 'com.google.gms.google-services'

Still I am getting error

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.

Could not find the react-native-firebase/app package, have you installed it?

2: Task failed with an exception.

compileSdkVersion is not specified. Please add it to build.gradle

BUILD FAILED in 46s

error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup. Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.

Could not find the react-native-firebase/app package, have you installed it?

2: Task failed with an exception.

compileSdkVersion is not specified. Please add it to build.gradle

BUILD FAILED in 46s

at makeError (F:\Salvador\node_modules\execa\index.js:174:9)
at F:\Salvador\node_modules\execa\index.js:278:16
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async runOnAllDevices (F:\Salvador\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:94:5)
at async Command.handleAction (F:\Salvador\node_modules\react-native\node_modules\@react-native-community\cli\build\index.js:186:9)

info Run CLI with --verbose flag for more details.

Upvotes: 1

Views: 1150

Answers (1)

Abdullah Mujahid
Abdullah Mujahid

Reputation: 917

For those who are still struggling to find the answer just

npm i @react-native-firebase/app

and you are good to go. Took me a day

Upvotes: 2

Related Questions