How to check google play services version and firebase version in react-native project?

7.8k views Asked by At

I am trying to install rn-push-notifications in react-native project for which I need the google play services version and firebase version. Could you please assist me?

3

There are 3 answers

0
Mohsen Vahabzadeh On

I use this method:

First run ./gradlew app:dependencies. You could send its output to a file for further searching.

Then search in the output for version of com.google.android.gms:play-services-base and com.google.firebase:firebase-core.

0
Vinayak Khandekar On

use command

cd android && ./gradlew app:dependencies | grep 'dependency_name_here'

eg.

cd android && ./gradlew app:dependencies | grep 'com.google.firebase:firebase-messaging'
1
Sanka Sanjeeva On

@Mohsen's answer was helpful to me to implement a react native app which has push notifications.

First I installed dependency react-native-push-notification

Then I navigated to the android folder and ran this command gradlew app:dependencies

Form the output of terminal, I found googlePlayServicesVersion and firebaseMessagingVersion by searching com.google.android.gms:play-services-basement and com.google.firebase:firebase-messaging

Further, to find supportLibVersion this answer was helped