简体   繁体   English

没有 google-services.json 和 google play 服务的 Firebase crashlytics

[英]Firebase crashlytics without google-services.json and google play services

I am trying to run the task crashlyticsUploadMappingFileRelease however, it fails with " Google App ID not found "我正在尝试运行任务crashlyticsUploadMappingFileRelease但是,它因“ Google App ID not found ”而失败

I do not want to have google play services plugin in my app.我不想在我的应用程序中使用 google play 服务插件。 How do I make it find the app ID?如何让它找到应用程序 ID?

I got the same problem and spent a lot of time to solve it.我遇到了同样的问题,花了很多时间来解决它。 Finally I got success result.最后我得到了成功的结果。 So, you have to add this所以,你必须添加这个

firebaseCrashlytics {
    mappingFileUploadEnabled false
}

to release (or every) build type in your project - module level build.gradle.在您的项目中发布(或每个)构建类型 - 模块级 build.gradle。 See this for details.有关详细信息,请参阅内容。

Later in the code you have to initialize the firebase app by calling稍后在代码中,您必须通过调用来初始化 firebase 应用程序

FirebaseApp.initializeApp(context, options);

FirebaseCrashlytics will be initialized as well. FirebaseCrashlytics 也将被初始化。

NOTE:笔记:

This approach has one disadvantage.这种方法有一个缺点。 If you use obfuscation, crashes in the firebase console will also be obfuscated如果您使用混淆,firebase 控制台中的崩溃也将被混淆

Hope this will help you or anyone else.希望这会帮助您或其他任何人。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM