Firebase Crashlytics-java.lang.IllegalStateException:Crashlytics内部版本缺失 [英] Firebase Crashlytics - java.lang.IllegalStateException: The Crashlytics build ID is missing

查看:374
本文介绍了Firebase Crashlytics-java.lang.IllegalStateException:Crashlytics内部版本缺失的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

根据在我们的应用程序中添加的Firebase Crashlytics的新版本,应用程序在启动时停止.

As per new version of Firebase Crashlytics added in Our App and application stopped at launch time.

java.lang.RuntimeException:无法获取提供程序com.google.firebase.provider.FirebaseInitProvider:java.lang.IllegalStateException:Crashlytics内部版本ID丢失.当应用的构建配置中缺少Crashlytics工具时,就会发生这种情况.请查看Crashlytics的入门说明,并确保您拥有有效的Crashlytics帐户.

java.lang.RuntimeException: Unable to get provider com.google.firebase.provider.FirebaseInitProvider: java.lang.IllegalStateException: The Crashlytics build ID is missing. This occurs when Crashlytics tooling is absent from your app's build configuration. Please review Crashlytics onboarding instructions and ensure you have a valid Crashlytics account.

应用级爬网 应用插件:"com.google.firebase.crashlytics"

App-Level Gradle apply plugin: 'com.google.firebase.crashlytics'

实现'com.google.firebase:firebase-crashlytics:17.1.1'

implementation 'com.google.firebase:firebase-crashlytics:17.1.1'

项目级Gradle classpath'com.google.gms:google-services:4.3.3' classpath'com.google.firebase:firebase-crashlytics-gradle:2.2.0'

Project-Levle Gradle classpath 'com.google.gms:google-services:4.3.3' classpath 'com.google.firebase:firebase-crashlytics-gradle:2.2.0'

按照Firebase指南分步进行 Firebase指南

Follow steps by step from Firebase guides Firebase Guides

但是早期的Fabric版本比当前的版本要好得多.

But earlier Fabric version is too much better than current one.

任何帮助将不胜感激.

推荐答案

在应用程序级别的build.gradle中,添加以下导入
apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.google.firebase.crashlytics'

In the build.gradle at the application level, add the following imports
apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.google.firebase.crashlytics'

然后,在gradle/wrapper/gradle-wrapper.properties文件中,将gradle版本升级到5.6.4
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip

Then, in the gradle/wrapper/gradle-wrapper.properties file, upgrade your gradle version to 5.6.4
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip

我以前使用gradle 5.1.1运行我的应用程序,然后升级到5.6.4版本解决了我的问题

I used to run my app with gradle 5.1.1 and upgrading to the version 5.6.4 fixed my problems

希望它会对您有所帮助!

I hope it'll help you !

这篇关于Firebase Crashlytics-java.lang.IllegalStateException:Crashlytics内部版本缺失的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆