完全从Android应用程序中删除Firebase分析 [英] Remove firebase analytics from android app completely

查看:145
本文介绍了完全从Android应用程序中删除Firebase分析的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的应用中添加了firebase分析,只是为了试用。我遵循官方指引中的步骤。

现在我决定反对了。我没有做任何事情来补充。
(从项目级别和应用程序级别的build.gradle中删除条目;从源代码中删除所有的用法。)

但是我仍然得到像

  I / FirebaseInitProvider:FirebaseApp初始化成功

当我的应用程序运行时。



这使我相信我没有完全删除它。这真的是我现在关心的问题,因为我的应用程序已经超出了方法数量限制,我必须启用multidex。



如何从应用程序中完全删除Firebase

解决方案

 配置{
all * .exclude组:'com.google.firebase',模块:'firebase-core'
all * .exclude组:'com.google.firebase',模块:'firebase -iid'
}

删除app / app.iml中包含firebase他们不会自动添加),并从生成的代码和中间输出中删除所有的firebase库。



与前面的答案相比,这会从apk中敲掉另外87,000个字节大小。

虽然我仍然不明白为什么我需要添加更多的代码来撤消添加的东西。这可能是构建系统中的一个错误。



@isnotmenow:非常感谢您指点我。


I added firebase analytics in my app just to try it out. I followed the steps in official guidelines.

Now I have decided against it. I have undone whatever I had done to add it. (Removed entries from project level and app level build.gradle; removed all usages from source code.)

But I am still getting logs like

I/FirebaseInitProvider: FirebaseApp initialization successful

when my app runs.

This leads me to believe that I haven't removed it completely. This is really a matter of concern for me now because my app has exceeded method count limit and I have had to enable multidex.

How can I completely remove firebase from my app?

解决方案

Adding

configurations {
    all*.exclude group: 'com.google.firebase', module: 'firebase-core'
    all*.exclude group: 'com.google.firebase', module: 'firebase-iid'
}

removes all lines from app/app.iml containing firebase (and they do not get added automatically again) and removes all firebase libraries from generated code and intermediate output as well.

Compared to the previous answer this knocks off another 87,000 bytes from apk size.

Though I still do not understand why I should have to ADD more code to undo adding something. It's probably a bug in the build system.

@isnotmenow: Thanks a lot for pointing me in this direction.

这篇关于完全从Android应用程序中删除Firebase分析的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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