Add to your /android/build.gradle file:
apply plugin: 'com.android.application' apply plugin: 'com.google.gms.google-services'
If your /android/build.gradle file begins like this:
buildscript { ext.kotlin_version = '1.7.10' repositories { google() mavenCentral() } dependencies { classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } } // More code...
It is using buildscript syntax. In this case, add the plugins like this:
buildscript { ext.kotlin_version = '1.7.10' repositories { google() mavenCentral() } dependencies { classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath 'com.google.gms:google-services:4.4.1' } } // More code...
Assuming Firebase instruction for /android/build.gradle is to add:
plugins { // Add the dependency for the Google services Gradle plugin id 'com.google.gms.google-services' version '4.4.1' apply false }
Source:
(The part where it says:
"Are you still using the buildscript syntax? Learn how to add Firebase plugins using that syntax")