12

i have already include google-services.json file in my app but it still give me error. Error:Execution failed for task ':app:processDebugGoogleServices'.

File google-services.json is missing. The Google Services Plugin cannot function without it. Searched Location: C:\Users\vikas\AndroidStudioProjects\FireBaseFunctionality\app\src\debug\google-services.json C:\Users\vikas\AndroidStudioProjects\FireBaseFunctionality\app\google-services.json

Vikas Sharma
  • 121
  • 1
  • 1
  • 5

7 Answers7

3

Had the same problem - builded before next step of tutorial. You have to generate and download the file from firebase website. See Error "File google-services.json is missing from module root folder. The Google Services Plugin cannot function without it" - late, but someone may need this nowdays.

1

go into SDK manager --> SDK tool---->install play service and USB tool and repository I have solved same problem with above method

or u can change the name of google service google-services.json instead of google-services(any number).json

keyur patel
  • 99
  • 1
  • 7
1

just change in the build.gradle the line

compile fileTree (dir: 'libs', include: ['* .jar'])

to

implementation fileTree(dir: 'libs', include: ['*.jar'])

1

What worked for me was:

And then follow the https://console.firebase.google.com steps to do in android studio:

Project-level build.gradle (/build.gradle):

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.8'

  }
}

allprojects {
  ...
  repositories {
    // Check that you have the following line (if not, add it):
    google()  // Google's Maven repository

    ...
  }
}

App-level build.gradle (//build.gradle):

apply plugin: 'com.android.application'

// Add this line
apply plugin: 'com.google.gms.google-services'


dependencies {
  // Import the Firebase BoM
  implementation platform('com.google.firebase:firebase-bom:28.3.0')


  // Add the dependency for the Firebase SDK for Google Analytics
  // When using the BoM, don't specify versions in Firebase dependencies
  implementation 'com.google.firebase:firebase-analytics'


  // Add the dependencies for any other desired Firebase products
  // https://firebase.google.com/docs/android/setup#available-libraries
}

Finally, press "Sync now" in the bar that appears in the IDE:

manuelpgs
  • 1,283
  • 1
  • 14
  • 20
0

Go to your flutter sdk folder used to build the app. Delete all the contents in the folder .pub-cache Now pub-get and run.

JIJO J
  • 169
  • 3
  • 7
0

Sometime we copy the downloaded file and put in app directory. But it changes the name. For example googleservices(1).json instead of googleservices.json. so make sure the name of file is correct.

0

change your googleservices(number).json to googleservices.json no number it worked for me I just encountered the same problem.

Gee
  • 1
  • 2
  • This does not really answer the question. If you have a different question, you can ask it by clicking [Ask Question](https://stackoverflow.com/questions/ask). To get notified when this question gets new answers, you can [follow this question](https://meta.stackexchange.com/q/345661). Once you have enough [reputation](https://stackoverflow.com/help/whats-reputation), you can also [add a bounty](https://stackoverflow.com/help/privileges/set-bounties) to draw more attention to this question. - [From Review](/review/late-answers/30704702) – Sercan Jan 02 '22 at 08:40