![](/img/trans.png)
[英]Error: File google-services.json is missing. The Google Services Plugin cannot function without it.
[英]Ionic 3 Error: "File google-services.json is missing. The Google Services Plugin cannot function without it." in ionic cordova build/prepare android
我正在嘗試在我的 Ionic 3 項目中執行ionic cordova build android
命令,但遇到了File google-services.json is missing. The Google Services Plugin cannot function without it.
File google-services.json is missing. The Google Services Plugin cannot function without it.
這是我的控制台中的跟蹤:
> File google-services.json is missing. The Google Services Plugin cannot function without it.
Searched Location:
C:\Users\Bryan\Desktop\iSpace\iSpaceProject\platforms\android\app\src\nullnull\debug\google-services.json
C:\Users\Bryan\Desktop\iSpace\iSpaceProject\platforms\android\app\src\debug\nullnull\google-services.json
C:\Users\Bryan\Desktop\iSpace\iSpaceProject\platforms\android\app\src\nullnull\google-services.json
C:\Users\Bryan\Desktop\iSpace\iSpaceProject\platforms\android\app\src\debug\google-services.json
C:\Users\Bryan\Desktop\iSpace\iSpaceProject\platforms\android\app\src\nullnullDebug\google-services.json
C:\Users\Bryan\Desktop\iSpace\iSpaceProject\platforms\android\app\google-services.json
我在網上找到的許多答案是下載google-services.json
文件並將其放在我的 platform/android/app 文件夾中。 但是,由於我的 firebase 應用程序是Web 應用程序,我無法從那里下載google-services.json
文件。 我所能做的就是將 firebase 配置復制到我的 html 頁面。
當我嘗試搜索我的文件目錄時,我也找不到任何與google-service.json
相關的文件。
請在這件事上給予我幫助! 我的目標是能夠在android studio 的 emulator上運行該應用程序。
請注意,我的 firebase 應用程序是一個Web 應用程序,無法直接從 firebase 控制台下載google-service.json
文件。
我找到了解決方案!
我通過執行cordova plugin remove cordova-support-google-services
並且它設法構建。 我也嘗試在Android Studio上運行它,並且效果很好!
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.