When i run flutter project i got this failure.
I tried to insert firebase into my project.
I did everything according to the instructions from the Firebase site
I have no idea what i have to do.
FAILURE: Build failed with an exception.
Where:
Settings file '/Users/daniilsereda/StudioProjects/translator/android/settings.gradle' line: 29
* What went wrong:
Plugin [id: 'com.google.gms.google-services', version: '4.4.1', apply: false] was not found in any of the following sources:
- Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
- Included Builds (None of the included builds contain this plugin)
- Plugin Repositories (could not resolve plugin artifact 'com.google.gms.google-services:com.google.gms.google-services.gradle.plugin:4.4.1')
Searched in the following repositories:
Google
MavenRepo
Gradle Central Plugin Repository
I’ve tried everything, but nothing works.
2
Answers
@Ultranmus Now i have this error. I had flutter stop working when I added firebase to this project. I even tried creating new flutter projects, they don't work either, but they have a different error. I've already searched everywhere for a solution to this issue, I can't find anything anywhere.
I have already updated gradle and flutter. I don't know what the problem is
enter image description here
According to your error and after checking your project i found that some plugin declaration is missing.
Add this
id "com.google.gms.google-services" version "4.4.1" apply false
in your
settings.gradle
Like below:
Also make your repo private, your credential like api key for firebase project is visible in the github repo.