2

I am trying to link my flutter app to firebase and I added all the plugins that I need firebase_core, cloud_firestore and firebase_auth at the latest versions. I also added the Jason file as instructed in the fire base website when creating the project. The problem is when I run it, it takes a very long time to finish running (in fact I never saw it finish running after adding the plugins) and that I always get this error

Plugin project :cloud_firestore_web not found. Please update settings.gradle.
Plugin project :firebase_core_web not found. Please update settings.gradle.
Plugin project :firebase_auth_web not found. Please update settings.gradle.

I tried following these links and I still get this error

https://github.com/FirebaseExtended/flutterfire/issues/2599

https://stackoverflow.com/questions/55159894/firebase-stuck-on-run-your-app-to-verify-installation-for-android/55161810

rene
  • 41,474
  • 78
  • 114
  • 152

1 Answers1

4

Add the following code to the file settings.gradle

def flutterProjectRoot = rootProject.projectDir.parentFile.toPath()

def plugins = new Properties()
def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins')
if (pluginsFile.exists()) {
    pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) }
}

plugins.each { name, path ->
    def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile()
    include ":$name"
    project(":$name").projectDir = pluginDirectory
}