如何完全禁用firebase?日志中显示的警告和错误 [英] how to disable firebase completly? warnings and errors shown in log
本文介绍了如何完全禁用firebase?日志中显示的警告和错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
欢迎大家
我正在禁用我的项目的分析功能,即删除.json文件并将其从应用gradle文件中删除:
I'm disabling analytics on my project deleting the .json file and deleting this from app gradle file:
apply plugin: 'com.google.gms.google-services'
并删除所有推入或分析初始化调用.
And also deleting all the push or analytics init calls.
此外,我在清单上添加了此内容
Also, I'm adding this on manifest:
<meta-data android:name="firebase_analytics_collection_deactivated" android:value="true"/>
即使我从清单中删除了两个通知服务( MESSAGING_EVENT
和 INSTANCE_ID_EVENT
)
Even I deleted the two notifications services from the manifst (MESSAGING_EVENT
and INSTANCE_ID_EVENT
)
但是,这样做之后,每次打开部分时都会收到此错误警告:
But after doing that, I'm getting this error warning every time I open a section:
02-26 13:05:15.687 10605-10605/? I/FirebaseInitProvider: FirebaseApp initialization unsuccessful
02-26 13:05:20.574 10605-10743/? I/FA: To enable faster debug mode event logging run:
adb shell setprop debug.firebase.analytics.app com.mypackage.myapp
02-26 13:05:20.578 10605-10743/? E/FA: Missing google_app_id. Firebase Analytics disabled.
在不删除gradle编译文件的情况下,我该怎么办才能完全禁用firebase?
What more should I do to completly disable firebase without removing the gradle compile files?
谢谢
推荐答案
您可以使用
<meta-data android:name="firebase_analytics_collection_enabled" android:value="false" />
或
FirebaseAnalytics.getInstance(activity).setAnalyticsCollectionEnabled(false);
这篇关于如何完全禁用firebase?日志中显示的警告和错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文