error when apply plugin: 'com.google.gms.google-services'

后端 未结 8 1476
夕颜
夕颜 2021-02-19 02:44

I followed google documentation to integrate my app to Google Analytics. But when adding

apply plugin: \'com.google.gms.google-services\'

and b

8条回答
  •  梦如初夏
    2021-02-19 03:38

    As many ppl said, I've added "classpath 'com.google.gms:google-services:3.0.0'" in the project level gradle.

    But, I encountered another error saying "File google-services.json is missing from module root folder.". Eventually, I needed to set up a project via the following link. https://developers.google.com/mobile/add?platform=android

    After setting up a project and it took me to go to Firebase console. In that page, I was able to download google-service.json file which was essential to solve this issue.

    Drag and drop that JSON file under your project's '/app' folder.

    It took me an hour to figure it out. I hope it's helpful for someone.

提交回复
热议问题