错误描述:Unable to get provider com.crashlytics.android.CrashlyticsInitProvider: io.fabric.sdk.android.services.concurrency.UnmetDependencyException: This app relies on Crashlytics. Please sign up for access at https://fabric.io/sign_up,
解决方法:
在AndroidManifest文件中加入:
<meta-dataandroid:name="firebase_crashlytics_collection_enabled"android:value="false"/>然后在module的build.gradle文件中添加配置:
dependencies { implementation 'com.crashlytics.sdk.android:crashlytics:2.9.3' }参考文章:https://cloud.tencent.com/developer/ask/152442
解决历程:
最开始看参考文章中作者中AndroidManifest文件中添加的是:
<meta-data android:name="firebase_crash_collection_enabled" android:value="false" />(区别就是crash和crashlytics)
但是运行时还是会闪退,出现新的错误:
Caused by: io.fabric.sdk.android.services.concurrency.UnmetDependencyException: This app relies on Crashlytics. Please sign up for access at https://fabric.io/sign_up,
install an Android build tool and ask a team member to invite you to this app's organization.
然后又百度了一通,将添加在AndroidManifest文件中的meta-data内容换了一下(crash换成了crashlytics),可以运行不闪退了。
虽然解决了这个错误,但是我还是稀里糊涂,希望有知道真正报错原因的朋友可以留言分享。