In my case my app (nativescript vue) was crashing after successfully copying the google-services.json, but at the time of rendering the app. I resolved it by adding all required dependencies in App-level build.gradle (//build.gradle) file as shown below:
apply plugin: 'com.android.application'
// Add this line
apply plugin: 'com.google.gms.google-services'
dependencies {
// add the Firebase SDK for Google Analytics
implementation 'com.google.firebase:firebase-analytics:17.2.2'
// add SDKs for any other desired Firebase products
// https://firebase.google.com/docs/android/setup#available-libraries
Make sure to add all required dependencies based on the Firebase features you have enabled by referring to the Gradle dependency listed in the SDK link above. Keep in mind that Analytics requires several other dependencies to be included as well. After adding all required dependencies, my app started without crasing.
Also make sure that in Project-level build.gradle (/build.gradle) file:
buildscript {
repositories {
// Check that you have the following line (if not, add it):
google() // Google's Maven repository
}
dependencies {
...
// Add this line
classpath 'com.google.gms:google-services:4.3.3'
}
}
allprojects {
...
repositories {
// Check that you have the following line (if not, add it):
google() // Google's Maven repository
...
}
}
I hope this helps anyone facing similar issue.