Flutter build crashes using ProGuard with Firebase Auth

蹲街弑〆低调 提交于 2019-12-05 05:51:24

Include

-keep class com.google.firebase.** { *; }

Proguard is providing you with several features: dead code removal, code size reduction by renaming class members and package names to short strings and, by that renaming, making the code more difficult to read and thus reverse engineer.

By keeping the whole com.google.firebase tree intact you are not benefiting from the size reductions. I guess obfuscation is irrelevant in this case since it's a open source library.

You could experiment with just keeping the top level API classes that you use (you may not be able to tell what those are without reading the firebase plugin implementation) to achieve the size reduction, but that's a lot of work to achieve a possible reduction in APK size, and probably introduces some fragility.

No, it is not 'optimal', but it's simple.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!