Android 找不到google-services.json
我已经将谷歌服务json文件放在了Android 找不到google-services.json,android,flutter,Android,Flutter,我已经将谷歌服务json文件放在了android/app/src 但是我得到了这个错误: Could not find google-services.json while looking in [src/nullnull/debug, src/debug/nullnull, src/nullnull, src/debug, src/nullnullDebug] registerResGeneratingTask is deprecated, use registerGeneratedFolde
android/app/src
但是我得到了这个错误:
Could not find google-services.json while looking in [src/nullnull/debug, src/debug/nullnull, src/nullnull, src/debug, src/nullnullDebug]
registerResGeneratingTask is deprecated, use registerGeneratedFolders(FileCollection)
Could not find google-services.json while looking in [src/nullnull/release, src/release/nullnull, src/nullnull, src/release, src/nullnullRelease]
registerResGeneratingTask is deprecated, use registerGeneratedFolders(FileCollection)
Could not find google-services.json while looking in [src/nullnull/profile, src/profile/nullnull, src/nullnull, src/profile, src/nullnullProfile]
registerResGeneratingTask is deprecated, use registerGeneratedFolders(FileCollection)
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
classpath 'com.google.gms:google-services:4.0.0'
}
将google services.json放在
android/app
目录中,而不是android/app/src试试这个
在应用程序升级时,您应该添加
apply plugin: 'com.google.gms.google-services'.
您应该添加以下依赖项
dependencies {
// Add this line
classpath 'com.google.gms:google-services:3.0.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
google services.json文件,您可以从谷歌控制台下载并放置在应用程序位置
- 切换到项目视图,以便查看实际的项目文件夹结构。
- 查找google-service.json文件,并将其拖动到应用程序目录(出于某种原因,当我使用文件浏览器添加它时,它将其放在gradle文件夹中)
- 清理/重建项目
这对我很有效我也有同样的问题。我试过这个,对m来说效果很好。
我认为这适用于cordova和ionic应用程序
这说明该文件应该在android/app
中,而不是android/app/src
尝试过,但现在它给了我错误``失败:生成失败,出现异常。*出了什么问题:entry:incrementalFolder=null``中的null值应该是另一个问题。你只收到那个信息吗?