Uploading ProGuard Mapping Files to Firebase

随声附和 提交于 2019-12-01 02:53:40

Set relative path to json in gradle.properties (in project root)

FirebaseServiceAccountFilePath = /firebase-crashreporting.json

and update this property in your build.gradle

apply plugin: 'com.android.application'
apply plugin: 'com.google.firebase.firebase-crash'

android {
    ...
}

setProperty("FirebaseServiceAccountFilePath", rootProject.rootDir.absolutePath + FirebaseServiceAccountFilePath)

dependencies {
    ...
}

The error message is misleading. You will see that if the file path that you give for the service account wasn't found. Try passing the full, unambiguous path of the service account file (try not to depend on relative paths).

I'll make sure that the next version of the plugin has a more meaningful error message for the case where the file isn't found. Sorry about the trouble.

In my case I was using Jenkins to upload the proguard mappings for me. I had to change the file permissions for the json private key file from 400 to 444.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!