[英]Android Firebase app distribution - Service credentials file does not exist. Please check the service credentials path and try again
I'm trying to migrate from Crashlytics Beta to Firebase App Distribution.我正在尝试从 Crashlytics Beta 迁移到 Firebase App Distribution。 CircleCi in the Middle. CircleCi 在中间。
The build failes in CircleCi with the following error: CircleCi 中的构建失败并出现以下错误:
- What went wrong: Execution failed for task ':FiverrApp:appDistributionUploadRelease'.出了什么问题:任务“:FiverrApp:appDistributionUploadRelease”执行失败。 Service credentials file does not exist.服务凭证文件不存在。 Please check the service credentials path and try again请检查服务凭据路径,然后重试
Here is how i'm configuring serviceCredentialsFile variable In my build.gradle:这是我在 build.gradle 中配置 serviceCredentialsFile 变量的方式:
release {
buildConfigField "boolean", "FORCE_LOGS", "true"
firebaseAppDistribution {
releaseNotes="Notes\n" + getCommitMessages()
groups="android-testers"
serviceCredentialsFile="/api-project-xxx-yyy.json"
}
}
the file api-project-xxx-yyy.json is in the same folder with build.gradle file.文件 api-project-xxx-yyy.json 与 build.gradle 文件位于同一文件夹中。 I've also tried:我也试过:
serviceCredentialsFile="api-project-xxx-yyy.json"
serviceCredentialsFile='api-project-xxx-yyy.json'
And still no luck... Would appreciate if someone can help me.仍然没有运气......如果有人可以帮助我,将不胜感激。
Try to use $rootDir
to get a path.尝试使用$rootDir
获取路径。 For example if you pass you credentials file api-project-xxx-yyy.json
to root directory than you can take it something like this:例如,如果您将凭据文件api-project-xxx-yyy.json
到根目录,则可以这样:
firebaseAppDistribution {
...
serviceCredentialsFile="$rootDir/api-project-xxx-yyy.json"
}
Try using a relative path instead:尝试使用相对路径:
serviceCredentialsFile = "./api-project-xxx-yyy.json"
Most likely your api-project-xxx-yyy.json
is not in your root directory but you want to use the project's directory.您的api-project-xxx-yyy.json
很可能不在您的根目录中,但您想使用项目的目录。
I use VS-Code.我使用 VS 代码。 I right-clicked on the json file in Explorer, copied the path (the full path) and set it in build.gradle我在资源管理器中右键单击json文件,复制路径(完整路径)并设置在build.gradle
serviceCredentialsFile= "path" serviceCredentialsFile="路径"
Ended up doing the following:最终做了以下事情:
buildTypes {
debug {
signingConfig signingConfigs.debug
}
release {
minifyEnabled false
debuggable false
signingConfig signingConfigs.release
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
firebaseAppDistribution {
releaseNotes = "Notes\n" + getCommitMessages()
groups = "android-testers"
serviceCredentialsFile = "file.json"
}
}
}
file.json exist in: file.json 存在于:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.