I have recently ejected my react native app to Expokit. I am trying to use react native firebase. After following the setup instructions for react native firebase as given on android installation page, when I execute 'react-native run-android' I get an error: "Could not find com.google.firebase:firebase-core:11.2.0". Please note that, as given on other pages on SO, I have already installed Google play services and Google repository from Android studio but even after doing that I am still getting the error. Here is the complete output of 'react-native run-android':
Scanning 885 folders for symlinks in /Users/aksheyjawa/Misc/mobiledev/reactNative/SRFYSSapp/node_modules (23ms)
JS server already running.
Building and installing the app on the device (cd android && ./gradlew installDebug)...
NDK is missing a "platforms" directory.
If you are using NDK, verify the ndk.dir is set to a valid NDK directory. It is currently set to /Users/aksheyjawa/Library/Android/sdk/ndk-bundle.
If you are not using NDK, unset the NDK variable from ANDROID_NDK_HOME or local.properties to remove this warning.
NDK is missing a "platforms" directory.
If you are using NDK, verify the ndk.dir is set to a valid NDK directory. It is currently set to /Users/aksheyjawa/Library/Android/sdk/ndk-bundle.
If you are not using NDK, unset the NDK variable from ANDROID_NDK_HOME or local.properties to remove this warning.
Incremental java compilation is an incubating feature.
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':app'.
> Could not resolve all dependencies for configuration ':app:_debugApkCopy'.
> Could not find com.google.firebase:firebase-core:11.2.0.
Searched in the following locations:
file:/Users/aksheyjawa/Library/Android/sdk/extras/google/m2repository/com/google/firebase/firebase-core/11.2.0/firebase-core-11.2.0.pom
file:/Users/aksheyjawa/Library/Android/sdk/extras/google/m2repository/com/google/firebase/firebase-core/11.2.0/firebase-core-11.2.0.jar
file:/Users/aksheyjawa/Misc/mobiledev/reactNative/SRFYSSapp/android/sdk-manager/com/google/firebase/firebase-core/11.2.0/firebase-core-11.2.0.jar
file:/Users/aksheyjawa/Library/Android/sdk/extras/android/m2repository/com/google/firebase/firebase-core/11.2.0/firebase-core-11.2.0.pom
file:/Users/aksheyjawa/Library/Android/sdk/extras/android/m2repository/com/google/firebase/firebase-core/11.2.0/firebase-core-11.2.0.jar
file:/Users/aksheyjawa/Misc/mobiledev/reactNative/SRFYSSapp/android/sdk-manager/com/google/firebase/firebase-core/11.2.0/firebase-core-11.2.0.jar
Required by:
project :app
> Could not find com.google.android.gms:play-services-base:11.2.0.
Searched in the following locations:
file:/Users/aksheyjawa/Library/Android/sdk/extras/google/m2repository/com/google/android/gms/play-services-base/11.2.0/play-services-base-11.2.0.pom
file:/Users/aksheyjawa/Library/Android/sdk/extras/google/m2repository/com/google/android/gms/play-services-base/11.2.0/play-services-base-11.2.0.jar
file:/Users/aksheyjawa/Misc/mobiledev/reactNative/SRFYSSapp/android/sdk-manager/com/google/android/gms/play-services-base/11.2.0/play-services-base-11.2.0.jar
file:/Users/aksheyjawa/Library/Android/sdk/extras/android/m2repository/com/google/android/gms/play-services-base/11.2.0/play-services-base-11.2.0.pom
file:/Users/aksheyjawa/Library/Android/sdk/extras/android/m2repository/com/google/android/gms/play-services-base/11.2.0/play-services-base-11.2.0.jar
file:/Users/aksheyjawa/Misc/mobiledev/reactNative/SRFYSSapp/android/sdk-manager/com/google/android/gms/play-services-base/11.2.0/play-services-base-11.2.0.jar
Required by:
project :app
> Could not find com.google.firebase:firebase-analytics:11.2.0.
Searched in the following locations:
file:/Users/aksheyjawa/Library/Android/sdk/extras/google/m2repository/com/google/firebase/firebase-analytics/11.2.0/firebase-analytics-11.2.0.pom
file:/Users/aksheyjawa/Library/Android/sdk/extras/google/m2repository/com/google/firebase/firebase-analytics/11.2.0/firebase-analytics-11.2.0.jar
file:/Users/aksheyjawa/Misc/mobiledev/reactNative/SRFYSSapp/android/sdk-manager/com/google/firebase/firebase-analytics/11.2.0/firebase-analytics-11.2.0.jar
file:/Users/aksheyjawa/Library/Android/sdk/extras/android/m2repository/com/google/firebase/firebase-analytics/11.2.0/firebase-analytics-11.2.0.pom
file:/Users/aksheyjawa/Library/Android/sdk/extras/android/m2repository/com/google/firebase/firebase-analytics/11.2.0/firebase-analytics-11.2.0.jar
file:/Users/aksheyjawa/Misc/mobiledev/reactNative/SRFYSSapp/android/sdk-manager/com/google/firebase/firebase-analytics/11.2.0/firebase-analytics-11.2.0.jar
Required by:
project :app
> Could not find com.google.android.gms:play-services-base:11.2.0.
Searched in the following locations:
file:/Users/aksheyjawa/Library/Android/sdk/extras/google/m2repository/com/google/android/gms/play-services-base/11.2.0/play-services-base-11.2.0.pom
file:/Users/aksheyjawa/Library/Android/sdk/extras/google/m2repository/com/google/android/gms/play-services-base/11.2.0/play-services-base-11.2.0.jar
file:/Users/aksheyjawa/Misc/mobiledev/reactNative/SRFYSSapp/android/sdk-manager/com/google/android/gms/play-services-base/11.2.0/play-services-base-11.2.0.jar
file:/Users/aksheyjawa/Library/Android/sdk/extras/android/m2repository/com/google/android/gms/play-services-base/11.2.0/play-services-base-11.2.0.pom
file:/Users/aksheyjawa/Library/Android/sdk/extras/android/m2repository/com/google/android/gms/play-services-base/11.2.0/play-services-base-11.2.0.jar
file:/Users/aksheyjawa/Misc/mobiledev/reactNative/SRFYSSapp/android/sdk-manager/com/google/android/gms/play-services-base/11.2.0/play-services-base-11.2.0.jar
Required by:
project :app > host.exp.exponent:expoview:19.0.0 > com.google.android.gms:play-services-analytics:9.8.0
project :app > host.exp.exponent:expoview:19.0.0 > com.google.android.gms:play-services-gcm:9.8.0
project :app > host.exp.exponent:expoview:19.0.0 > com.google.android.gms:play-services-location:9.8.0
project :app > host.exp.exponent:expoview:19.0.0 > com.google.android.gms:play-services-fitness:9.8.0
project :app > host.exp.exponent:expoview:19.0.0 > com.google.android.gms:play-services-auth:9.8.0
project :app > host.exp.exponent:expoview:19.0.0 > com.google.android.gms:play-services-ads:9.8.0
project :app > host.exp.exponent:expoview:19.0.0 > com.google.android.gms:play-services-maps:9.8.0
project :app > host.exp.exponent:expoview:19.0.0 > com.google.android.gms:play-services-analytics:9.8.0 > com.google.android.gms:play-services-analytics-impl:9.8.0
project :app > host.exp.exponent:expoview:19.0.0 > com.google.android.gms:play-services-gcm:9.8.0 > com.google.android.gms:play-services-iid:9.8.0
project :app > host.exp.exponent:expoview:19.0.0 > com.google.android.gms:play-services-auth:9.8.0 > com.google.android.gms:play-services-auth-base:9.8.0
project :app > host.exp.exponent:expoview:19.0.0 > com.google.android.gms:play-services-ads:9.8.0 > com.google.android.gms:play-services-clearcut:9.8.0
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 52.177 secs
Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/android-setup.html
Here are a few lines from build.gradle:
compile(project(':react-native-firebase')) {
transitive = false
}
compile "com.google.firebase:firebase-core:11.2.0"
compile "com.google.android.gms:play-services-base:11.2.0"
compile "com.google.firebase:firebase-analytics:11.2.0"
apply plugin: 'com.google.gms.google-services'