制作自定义调试基座,选择云端证书打Android包,总是报错,提示缺少google-services.json文件,请问怎么解决?
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:processReleaseGoogleServices'.
File google-services.json is missing. The Google Services Plugin cannot function without it.
Searched Location:
[PackagePath]/app/src/release/google-services.json
[PackagePath]/app/src/google-services.json
[PackagePath]/app/src/Release/google-services.json
[PackagePath]/app/google-services.json* Try:
Run with --debug option to get more log output.
Run with --scan to get full insights.
1***@qq.com (作者)
如题用的是uni官网提供项目打包的,没用到google相关服务
uniplugin_richalert
dependencies {
compileOnly fileTree(dir: 'libs', include: ['*.jar'])
}
2024-12-16 15:10
DCloud_App_Array
回复 1***@qq.com: build.gradle中是否配置已使用google的插件?
2024-12-16 15:37
1***@qq.com (作者)
回复 DCloud_App_Array: apply plugin: 'com.android.library'
uniplugin_richalert模块全部内容如下
android {
compileSdkVersion 29
namespace 'uni.dcloud.io.uniplugin_richalert'
defaultConfig {
minSdkVersion 16
targetSdkVersion 28
}
repositories {
flatDir {
dirs 'libs'
}
}
dependencies {
compileOnly fileTree(dir: 'libs', include: ['*.jar'])
}
2024-12-16 16:13
DCloud_App_Array
回复 1***@qq.com: 云端打包还是离线打包的?云端打包提供完整错误日志链接地址,离线打包自行检查原生工程的build.gradle配置。
2024-12-16 17:32
1***@qq.com (作者)
回复 DCloud_App_Array: https://app.liuyingyong.cn/build/errorLog/e3c8c680-bc04-11ef-a8c1-69acdd0060b1
2024-12-17 07:27
DCloud_App_Array
回复 1***@qq.com: 从日志看是应用manifest.json勾选了unipush的fcm厂商通道,但是没有在后台配置fcm的google-services.json数据导致。如果没有配置厂商通道就不要在manifest.json中勾选fcm厂商通道。
2024-12-17 17:55
1***@qq.com (作者)
回复 DCloud_App_Array: 去掉可以了,谢谢
2024-12-18 15:23
s***@baozun.com
回复 DCloud_App_Array: 我没有勾选Google的FCM模块也报这个错误
2024-12-26 17:59
DCloud_App_Array
回复 s***@baozun.com: 单独发帖,提供完整的云端打包错误日志链接地址。
2024-12-27 12:21